Flash Training

Home Food Mates • Members Tutorials Forum Buy Templates Contact Us 

 


Flash Tutorials

   

Tutorial - Web Page Controls Flash Movie

 

Free Tutorial


Step 2    <<   Previous      Intro   1   2   3     Next   >>       >>   Webwasp Mates

 

Step Two: Creating the Web page

  1. Open your favourite web editor such as Dreamweaver.
  2. Create a new web page.
  3. Save this page to an appropriate folder: Save
  4. Place the Flash Movie (swf file) file (that you created in step 1.5 above) in the same folder as your web page.

    Note: You may need to use My Computer, or some similar file management program to do this.

  5. Using the code edit mode (or Windows Note Pad) in your web editor, add your Flash Movie to your web page by using the code below:

    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="example" name="example" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="xxx" height="xxx">
    <param name="movie" value="
    YourMovieName.swf">
    <param id="example" value="example">
    <param name="example" value="example">
    <param name="quality" value="high">
    <embed src="
    YourMovieName.swf" id="example" name="example" swliveconnect="true" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="xxx" height="xxx"></embed>
    </object>

    Note: You must use the code above or it will not work.

  6. Now change the XXX values for the width and height values of your Flash Movie.
  7. Then replace YourFileName with the file name of your movie.

    Note: Be careful because this is case sensitive, also never use spaces for file names that are used on the web.

  8. Now to control your flash movie you can use any of the following methods:

To play a Movie Clip:

    <a href='javascript:example.TPlay("_level0/InstanceNameOfMC")'>Play First Movie</a>

    Note: Replace InstanceNameOfMC with the Instance Name of the Movie Clip you want to control

To stop a Movie Clip:

    <a href='javascript:example.TStopPlay("_level0/InstanceNameOfMC")'>Stop First Movie</a>

To go a specific frame number:

    <a href='javascript:example.TGotoFrame("_level0/InstanceNameOfMC", "NumberOfFrame")'>Stop First Movie</a>

To go a specific frame label:

    <a href='javascript:example.TGotoLabel("_level0/InstanceNameOfMC", "NameOfLabel")'>Stop First Movie</a>

To move one frame forward in a Movie Clip:

    <a href='javascript:example.TGotoFrame("_level0/InstanceNameOfMC", example.TCurrentFrame("_flash0/InstanceNameOfMC")+1)'>Forward one frame</a>

Move one frame back in a Movie Clip:

    <a href='javascript:example.TGotoFrame("_level0/InstanceNameOfMC", example.TCurrentFrame("_flash0/InstanceNameOfMC")-1)'>Backward one frame</a>

Load an external Movie into the main Movie:

    <a href='javascript:example.TLoadMovie("1", "NameOfExsternalMovie.swf")'>Load External Movie</a>

Note: You can change the value 1 to whatever level you want to load the Movie into.

Cross Ref: For more information about loading external Movies into a base Movie using Levels see: Loading Movies into Levels or Movie Clips

Clear the external Movie you loaded into your main Movie:

    <a href='javascript:example.TLoadMovie("1", "")'>Clear External Movie</a>

    Note: Use the same number as you did when you loaded the Movie.

         

Step 2    <<   Previous      Intro   1   2   3     Next   >>       >>   Webwasp Mates


Webwasp Community: Webwasp Mates & Dates

Why not try out webwasp's new community. Meet new people, find friends in your area: Webwasp Mates & Dates

 Top of Page Home Food Mates Members Tutorials Forum Buy Templates 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.