Hi! I have some code in OnPreload/OnShow and I wanted to jump to the same page when I click a button to execute the code again (just like simluating a click on a button) without adding a new function for it. But it seems AMS does nothing when you Page.Jump to the same page. So I think the best and easiest way is create functions and add them to OnPreload and execute the same functions on Button Click. But it would be nice to be able to just call the page and all actions with a page.jump again.
Announcement
Collapse
No announcement yet.
Suggestion: Page.Jump to current page
Collapse
X
-
Originally posted by Bl4ckSh33p View PostHi! I have some code in OnPreload/OnShow and I wanted to jump to the same page when I click a button to execute the code again (just like simluating a click on a button) without adding a new function for it. But it seems AMS does nothing when you Page.Jump to the same page. So I think the best and easiest way is create functions and add them to OnPreload and execute the same functions on Button Click. But it would be nice to be able to just call the page and all actions with a page.jump again.We are slowly invading your planet to teach lazy humans to read the user manual.
But don't be scared: we are here to help.
-
When I was still working and using AMS I'm sure that I did exactly this on a number of occasions just by specifying the current page in the action:-
Code:Page.Jump("CurrentPageName");
Hmm.. it seems that my grey cells are in fact failing me.
Comment
-
I can't remember exactly what I did in the past or even what I needed to achieve but it seems as if jumping to the same page does actually work in part. The attached test seems to work to some extent. Suppose it depends on what you've got happening in the pre-load.Attached Files
Comment
-
I found another workaround. I created a new page and onShow it jumps back to the page I was before. So the OnPreload and OnShow will be executed again.Bl4ckSh33p-Soft - Custom Software and Indie Games
Comment
Comment