1 Reply Latest reply on Feb 10, 2013 5:05 AM by Ned Murphy

    Frame Position Question AS2


      I'm testing a simple Flash project made up of two frames. 1st frame has a nextFrame button at the top and the 2nd frame has a prevFrame button at the bottom.

      My document is long measuring 1000 pixels. I'm then inserting the published. swf into a html document in Dreaweaver.


      When I preview the html page in a browser the nextFrame button takes me to frame 2, I then scroll down (with the browser window) to find the prevFrame button to go back.


      My problem is when the prevFrame button sends the swf back to frame 1, it's in the lower scrolled position. What I would like to achieve is when I go back to frame 1 it returns back to the top.


      Not sure if this is AS2 code to add in flash to resolve this or if its something to add in Dreamweaver with html or css.


      Any advice would be greatly appreciated.

        • 1. Re: Frame Position Question AS2
          Ned Murphy Adobe Community Professional & MVP

          If you are scrolling the browser window then you need to make the browser window return to the top.  You could probably do this by placing a named anchor in the html at the beginning and have the prevFrame button link to it.  This would be refreshing the page.


          If you didn't want to have the Flash file tell the html page to adjust the window scroll position using javascript  you would need to make use of the ExternalInterface class.  Search Google using "javascript scroll page" for the javascriot end of things.  Here's one link from that search: http://www.mediacollege.com/internet/javascript/page/scroll.html