Flash Tutorials: Navigating with the Browser Back Button

Home • Members Tutorials Forum iSnapChat Contact Us 

 


Flash Tutorials

   

Tutorial - Browser Back Buttons used with Flash

Free Flash Tutorial

Step 3    <<   Previous      Intro   1   2   3   4   5     Next   >>      

 

Step Three: Creating the Navigator

  1. Create a new Symbol: Insert > New Symbol (Ctrl F8)
  2. Give it a name:navigator
  3. Select: Movie Clip
  4. Click: OK
  5. Add this code to: Frame 1
  6. // This function is continually called
    function checkPage() {
       // Set the new page to the value of the new page loaded
       newPage = _root.page;
       // If the page variable has changed, navigate to new page
       if (oldPage != newPage) {
          // An object-oriented way of telling the
          // Content object to navigate to the new page
          // Trace(newPage);

          _root.Movie.gotoAndStop("f"+newPage);
       }

       // Set the old page number to the new page number
       oldPage = newPage;
    }

  7. Create a blank frame in: Frame 2
  8. Return to the: Main Stage
  9. Drag an Instance of the Movie Clip on the Main Stage:navigator
  10. Select the Movie Clip and add this code:
  11. // This Movie Clip checks for the next section to navigate to
    onClipEvent (enterFrame) {
       // Call the function inside this Movie Clip
       this.checkPage();
    }

         

Step 3    <<   Previous      Intro   1   2   3   4   5     Next   >>      


24210 visitors to this page since 31 May 07 •

Phil Schulz's Facebook Profile
Webwasp is Phil Schulz's baby. You are welcome to contact me or become my Facebook friend: Click here

 Top of Page HomeMembers Tutorials Forum iSnapChat Contact Us 
 All material on this site is protected under international copyright © law. DO NOT reproduce any material from this site without written permission. Please ask as permission is often granted.