- This topic has 4 replies, 5 voices, and was last updated 11 years, 1 month ago by
Gameking1Duke.
-
AuthorPosts
-
softandartsMemberHi everybody,
1) I find this syntax for dynamically navigate in screens with effects:
phoneui.gotoScreen(‘contacts-screen’, ‘FADE’)
my screen is named “Officine.mobi”: I change the code in this:
phoneui.gotoScreen(‘Officine’, ‘FADE’)but not run … why ?
2) Is possible navigate to URL ?
(this syntax not run:)
phoneui.gotoURL(‘http://www.softandarts.net’, ‘FADE’)Thanks and sorry for my bad english
Luca
June 21, 2013 at 2:02 am #340175
alabastidaMemberWhen you integrate a call to another mobi Screen, the screen gets embedded in the same html of the start page, so, you need to refer to it by it’s true html id, for example:
instead of
phoneui.gotoScreen(‘Officine’, ‘FADE’);use the html id of the screen, it would be something like:
phoneui.gotoScreen(‘m1-Officine’, ‘FADE’);Remember, you need to somehow relate the secondary screen you want to call into the main one, the way i do that it’s by adding a button and hiding it somewhere and i give it the action goToScreen to my secondary screen so it gets embedded, in your case Officine.mobi, it’s a little tricky but it works, if anyone knows a better way to do it, please suggest!!!
Regards!
Adrian 🙂June 21, 2013 at 2:11 am #340176
Stu WadeMember@ Adrian,
Unless I am missing something, this is exactly the purpose of the ‘Additional Project Files’ entry on the designated start-up screen Properties tab.
June 21, 2013 at 3:02 am #340177
paulDMemberYep Stu’s right use the additional project files, works a treat.
Paul
May 3, 2014 at 9:49 pm #349209
Gameking1DukeMemberWith the new multiPage widget, the best way to deal with this (in my opinion) is to make the whole app structure of layered multiPages (which solves the whole pages being linked problem), and using the phoneui.gotoMultiPagePage function:
phoneui.gotoMultiPagePage(widgetId, targetType, pageId, transition)
widgetId is m1-{id of mobi page}-{id of multipage}
targetType is ‘SET_PAGE’ if you want to establish a specific page to transition to or these for the dynamic pages:
FIRST
LAST
NEXT_STOP_AT_LAST
PREVIOUS_STOP_AT_FIRST
NEXT_CIRCULAR
PREVIOUS_CIRCULARpageId is m1-{id of mobi page}-{id of page}
transition is same as it the transition strings for phoneui.gotoScreen -
AuthorPosts