Sunday 15 June 2014

How to make the browser back button work for a Flash-based Website? -


Can the browser back on some previous frames when clicking the back button in the browser? Similarly, can the fresh button be used to refresh the same frame and should not go back to the starting frame again?

It depends on how you make it. First of all, you have to import something called SWFAddress. To use SWFAddress, you need to make sure that you are embedding your flash using SWFObject, not just the object / ambit tag.

SWFAddress lets you add anchor tags to your URLs. This allows you to change the URL in such a way that the browser can understand without refreshing the page. For example, if my app is on www.mypage.com/flash and I set up SWFAddress I can set it so that when I press the button to go to the page, the following happens:

< Ol>
  • SWFAddress varies my URL to www.mypage.com/flash.html # Page 2
  • Javascript SWFAddress files notice this change and notify the flash.
  • Flash says, "Oh, look, the URL is changing and someone is paying me" Page 2 "- What do I want to do with that?
  • You can set a switch statement that will allow Flash to respond to these events in an intelligent, predictive manner - for example, you can say "if url changes in 'page2', Goto and sitop (2)" If you are running things, then it is the same.
  • I do not necessarily have to Frames will be doing, however - what you really want is the functions of controlling the behavior of the functions. Instead of pasting all of you, page 2 content in frame 2, you create the function goto page (2) And put their logic there.

    As far as one frame is to refresh, then it depends on how you code it - but if someone in the browser refreshes it The browser window will always refresh. With SWFA Picture, however, if you have set it correctly, it will always take you to the destination that you have linked to anchor tag.

    Does this help ? Any questions?


    No comments:

    Post a Comment