- This topic has 19 replies, 3 voices, and was last updated 12 years, 3 months ago by
support-octavio.
-
AuthorPosts
-
appmosMemberI´m using this code:
setInterval(function(){phoneui.gotoPage('screen2', FADE)},3000);
But not works. What´s wrong?
Thanks
September 24, 2012 at 2:48 pm #330435
support-octavioMemberHi appmos,
Please try replacing by this:
setInterval(function(){phoneui.gotoPage('m1-screen2', "FADE")},3000);
September 24, 2012 at 3:11 pm #330437
appmosMemberHi Octavio.
The screen has not changed. I’ll see the result on the test center, right?
Thanks
September 24, 2012 at 3:21 pm #330438
support-octavioMemberHi appmos,
>The screen has not changed. I’ll see the result on the test center, right?
Yes, you will see it there.Q: are you adding your “scree2.mobi” as an additional project file? If no, please do it. ( See http://www.genuitec.com/mobile/docs/highlights/current/#sec4a )
September 24, 2012 at 3:41 pm #330439
appmosMemberI added the screen but still does not work. Now I see the background image of the screen2 in splash Screen2
Code:
<script> function splash() { setInterval(function(){phoneui.gotoPage('m1-screen2', "FADE")},3000); } </script>
body onload="splash()">
One doubt> I need to add the screens in my first screen (splash screen) right?
September 24, 2012 at 7:07 pm #330445
support-octavioMemberHi appmos,
To avoid modify the generated html file, I suggest you put the code above on the phoneui.documentReadyHandler function in custom.js file.
September 25, 2012 at 6:49 am #330465
appmosMemberHi Octavio
I do not know how to include the code on this page. Could you help me?
Thanks
September 25, 2012 at 1:19 pm #330485
support-octavioMemberHi appmos,
You can use either any text editor or the one is included within Test Center. See http://www.genuitec.com/mobile/docs/workingWithGeneratedFiles/workingWithGeneratedFiles.html#editing_javascript
September 25, 2012 at 2:29 pm #330487
appmosMemberHi Octavio
I don´t know how the code should be.
In this way?
phoneui.gotoScreen('contacts-screen', 'FADE')
September 25, 2012 at 3:25 pm #330489
support-octavioMemberHi appmos,
According next doc I suspect the name to call your second screen is m1-contacts_screen. So your code should be something like this:
setInterval(function(){phoneui.gotoPage('m1-contacts_screen', "FADE")},3000);
September 26, 2012 at 5:25 am #330505
appmosMemberSo just like the function I had prepared in html.
It worked, but the other application screens are also being affected: when access another screen after 03 seconds returns to the screen that I determined in the code.
What should I do so that only the splash screen go to the main screen?
Thanks
September 26, 2012 at 12:24 pm #330532
support-octavioMemberHi appmos,
You can try with setTimeout() with this your function will be called only one time.
setTimeout(function(){phoneui.gotoPage('m1-contacts_screen', "FADE")},3000);
Let me know how it goes for you.
September 26, 2012 at 12:46 pm #330534
appmosMemberGreat! It worked very well. Now there is the possibility of generating splash screen for Android too. Thank you, Octavio.
February 26, 2013 at 12:08 am #335933
badal405MemberYou can use either any text editor or the one is included within Test Center. See http://www.genuitec.com/mobile/docs/workingWithGeneratedFiles/workingWithGeneratedFiles.html#editing_javascript
Hi Octavio,
I follow the above link and write the code as
setInterval(function(){phoneui.gotoPage(‘LoginForm.mobi’, “FADE”)},3000);
just above of
phoneui.documentReadyHandler = function() {}
but still not working. BTW, i have two separate screen not page. So “gotoPage” is it the appropriate function for open new screen?
Waiting for your reply.
Thanks and regards.February 26, 2013 at 12:13 am #335934
badal405Member@appmos wrote:
So just like the function I had prepared in html.
It worked, but the other application screens are also being affected: when access another screen after 03 seconds returns to the screen that I determined in the code.
What should I do so that only the splash screen go to the main screen?
Thanks
Could you please tell me where you have written the function and where you call the function?
-
AuthorPosts