Flash Tutorials: The Browser Back Button

Home • Members Tutorials Forum iSnapChat Contact Us 

 


Flash Tutorials

   

Tutorial - Browser Back Buttons used with Flash

Free Flash Tutorial

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

 

Step Five: Creating the Web Pages

You will now need to create 6 web pages. So you will need to go to your favourite web editor like Dreamweaver or a text editor like Notepad.

  1. Create 6 web pages with the following code:
  2. <html>
    <head>
    <title>1</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script language="JavaScript" type="text/javascript">
    parent.setPage(1);
    </script>
    </head>
    <body>
    </body>
    </html>

  3. Only change the value 1 to 2 for the second web page and to 3 for the third web page etc till you get to the sixth web page
  4. Now add the following HTML code in the HTML code view of your web page editor:

    <p>
    <object classid= "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase= "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version= 5,0,0,0" width=XXX height=XXX id="mymovie">
    <param name=movie value="YourFileName.swf">
    <param name=quality value=high>
    <param name=menu value=false>
    <param name=bgcolor value=#999999>
    <embed src="YourFileName.swf" quality=high bgcolor=#999999 width=XXX height=XXX name=mymovie swliveconnect= true type="application/x-shockwave-flash" pluginspage= "http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> </embed>
    </object>

    <iframe src="1.html" id="historyframe" name="historyframe" frameborder="0" width="0" height="0"></iframe>

    <script language="JavaScript" type="text/javascript">
    // This function is called from the page in the iframe
    function setPage (newPage) {
    // Check if Flash object exists
    if ( window . document . mymovie ) {
    // Set page variable in _root timeline of Flash movie
    window . document . mymovie . SetVariable ( "page" , newPage );
    }
    }
    </script>
    </p>

  5. Note: Except for the two <p> paragraph </p> tags (which are optional) you MUST use this code or it will not work!! Also the iframe tags may cause a small frame or box to be visible in your web editor. Ignore this as it is set to a zero size so it will not be visible in on your web page.

  6. Change the XXX values for so that the width and height values are how you want your Flash Movie to display.

  7. Then replace YourFileName with the file name of your Movie. Be careful this is case sensitive and never use spaces for file names that are used on the web.

    Important Note: All the web pages, files and the swf movie MUST be uploaded to the same location. If however the Flash Movie is in a different location you must include the file path. If you don't know about file paths just make sure your Flash Movie is located in the same folder as your web pages.

You will of course have to upload the all the files to the web and test your buttons but more or less that's it. Have fun!

I hope you have found this useful. If so perhaps you could recommend this site to others and link to webwasp!

 

Please indicate what you thought of this tutorial 
10 is the best: 
10 9 8 7 6 5 4 3 2 1

         

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


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.