- This topic has 15 replies, 3 voices, and was last updated 12 years, 1 month 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-1228
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
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,
Robert
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.
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’));
BrandonMemberYou would just need to adjust the screen name:
$('#m1-test1-image1').attr('src', $('#m1-test2-image1').attr('src'));
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’));
BrandonMemberSorry, looking at it my code is backwards.
$('#m1-test2-image1').attr('src', $('#m1-test1-image1').attr('src'));
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.
rob@volleyhollix.comMemberHello…did I lose you?
rob@volleyhollix.comMemberare you there?
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')
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.
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?
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