- This topic has 15 replies, 3 voices, and was last updated 12 years, 3 months ago by
rob@volleyhollix.com.
-
AuthorPosts
-
rob@volleyhollix.comMemberHi there,
In Mobione design mode creating an app for the iPhone. How do I make my app copy an image from one panel to another panel on a separate .mobi file by just pressing or touching on that image?
Any help on this would be appreciated.
Thanks,
Robert
(619) 733-1228March 21, 2013 at 7:42 pm #336892
support-octavioMemberHi Robert,
Do you want to copy the images on Design Center of one .mobi file to another one? Or do you want to do some codding that make image in current screen will be copied to secondary screen? For first thing you just need select your image in first screen use the short-cut CTRL + C and then go to secondary screen and paste your image with short-cut CTRL + V
March 21, 2013 at 9:56 pm #336895
rob@volleyhollix.comMemberHi there,
Thanks for getting back to me.
You missed my question.
I want the end-user (Not me) to be able to touch an image on their iPhone…and that same image will be copied into another panel in a different screen. So in essence that image is copied and transferred into a separate screen that the end-user will be able to view on their iPhone.
How do I go about designing this in Mobione?
Thanks,
RobertMarch 22, 2013 at 9:14 am #336908
BrandonMemberI think this is what you want.
On the first image set the action to run javascript and try this.
$('#m1-screen1-image1').attr('src', $('#m1-screen2-image1').attr('src'));
That will copy the image1 on screen1 to image1 on screen2 then they touch it.
March 22, 2013 at 12:07 pm #336918
rob@volleyhollix.comMemberI have 2 .mobi files in my app. I named them test1.mobi and test2.mobi.
Each screen has a panel (panel1).
So would the code below work? Please check for syntax. Thanks.
$(‘#m1-panel1-image1’).attr(‘test1.mobi’, $(‘#m1-panel1-image1’).attr(‘test2.mobi’));
March 22, 2013 at 12:25 pm #336920
BrandonMemberYou would just need to adjust the screen name:
$('#m1-test1-image1').attr('src', $('#m1-test2-image1').attr('src'));
March 22, 2013 at 12:48 pm #336921
rob@volleyhollix.comMemberI pasted the below code in the code box and it doesnt work. I am testing this in the test center by emulating the finger using my mouse but when I click on the image it doesn’t do anything.
So what I’m doing is I click on the image…thenafter I click on the button that will take me to the second screen. But I don’t see the image there
$(‘#m1-test1-image1’).attr(‘src’, $(‘#m1-test2-image1’).attr(‘src’));
March 22, 2013 at 1:03 pm #336922
BrandonMemberSorry, looking at it my code is backwards.
$('#m1-test2-image1').attr('src', $('#m1-test1-image1').attr('src'));
March 22, 2013 at 1:11 pm #336923
rob@volleyhollix.comMemberIt’s still not working….
basically I want to click on the image from screen one. When I do that I want screen two to display on the iPhone with the image from screen one. So in essence it will take me to screen two with a copy of that image.
Your help is appreciated.
March 22, 2013 at 1:24 pm #336924
rob@volleyhollix.comMemberHello…did I lose you?
March 22, 2013 at 1:45 pm #336925
rob@volleyhollix.comMemberare you there?
March 22, 2013 at 2:12 pm #336926
BrandonMemberYeah, I dont think I quite understand. That takes the image from the test1 screen and copies it into the test2 screen…did you want it to automatically go to the test2 screen also? if so just add:
phoneui.gotoPage('m1-test2')
March 22, 2013 at 2:36 pm #336927
rob@volleyhollix.comMemberphoneui.gotoPage(‘m1-test2’) works good. thanks.
but the code below appears to not execute:
$(‘#m1-test2-image1’).attr(‘src’, $(‘#m1-test1-image1’).attr(‘src’));
Is there anything wrong with the syntax? Can you please test on your PC? I’m using .GIF file as an image.
March 22, 2013 at 2:59 pm #336929
rob@volleyhollix.comMemberok this is getting wierder ….
in regards to phoneui.gotoPage(‘m1-test2’), this only works with the images when I place a button on the screen and “OnClick” I set “Go to Screen” to test2.mobi.
If i get rid of this button, phoneui.gotoPage(‘m1-test2’) does not work with the images… in other words it will not go to test2
Is this a bug? Can you test in your PC?
March 22, 2013 at 3:12 pm #336930
BrandonMemberHere is a test project that works well. If you click on the button it will take you to the test2 screen with the facebook image. If you click the image it copies the image to test2, so they will both be the m1 logo, and automatically goes there.
Attachments:
You must be logged in to view attached files. -
AuthorPosts