Announcement

Collapse
No announcement yet.

Suggestion: Page.Jump to current page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Suggestion: Page.Jump to current page

    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.
    Bl4ckSh33p-Soft - Custom Software and Indie Games

  • #2
    Originally posted by Bl4ckSh33p View Post
    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.
    Simply put all the code you have in "Preload" and/or OnShow inside respective functions in Global and then call them anywhere or anytime you need.
    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.

    Comment


    • #3
      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");
      - Now I'll have to break my old computer out and see if my memory is playing tricks on me.

      Hmm.. it seems that my grey cells are in fact failing me.

      Comment


      • #4
        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


        • #5
          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

          Working...
          X