Flash Training: External SWF Movies

HomeTutorialsForumWebwasp MembersTemplatesMatesFoodContact

 


Flash Tutorials

   

Tutorial - Preloading External Flash Movies

Free Flash Tutorial


Step 9    <<   Previous      Intro   1   2   3   4   5   6   7   8   9    >>       >>   Webwasp Mates

 

Step Nine: The External SWF Movie

In your external Flash Movie that you want to load you MUST add 2 blank frames at the very beginning on the Movie. It is probably easiest to just create a new scene. This first Scene must be the first thing to load. In the first frame you mush have a stop(); command and in the second frame you must add the label: Play and a play(); command. This is how to do it:

  1. Open the Movie that you wish to use as your: External Flash Movie
  2. Open the Scene Panel: Window > Other Panels > Scenes (Shift F2)

    Every Flash Movie has at least one Scene by default. So unless you have created any Scenes you will see something like this:


    The Scene Panel.

  3. Double Click on the Scene 1 Label and rename it: Main Content


    Scene 1 renamed.

  4. Click on the Add Scene button:


    You now have two Scenes.

  5. Rename Scene 1 to: External Preloader


    Scene 2 has been re-named.

  6. Note: The Flash Movie plays from the top Scene down which means that the Preloader will play after the Main Content. Not much point in that!!

  7. Drag the new External Preloader Scene to the top:


    The Scene order is now correct.

  8. Click on the External Preloader Label in the Scene Panel to go to the new Scene. Go to: External Preloader Scene

  9. Add the following ActionScript to Frame 1:
  10. stop();

  11. Right click on Frame 2 and select: Insert Blank Keyframe (not Insert Frame)

  12. If the Property Inspector is closed, open it: Window > Properties (Ctrl F3)

  13. Give frame 2 the following Label: Play (This is case sensitive)


    Frame Label: Play

  14. Add the following ActionScript to Frame 2 :
  15. play();

The External Flash Movie is now complete. Except of course you have to add the real content in the Main Scene.

    Warning: If you create a Flash Movie that loops (such as the animation in the example at the beginning of this tutorial) then you need to make sure that the Main content layer(s) does not loop back to this first preloader Scene. Otherwise the stop(); will stop the loop and the animation will cease to animate. In my example that I used at the top of this tutorial I placed the following ActionScript at the end of the Main Content Scene:

        gotoAndPlay (1);

    This causes the animation to loop back to frame1 of the Main Scene and play again. If I did not do this the Movie would (by default) go back to Frame 1 of the first Scene and stop. As the main Movie has already loaded the external preloader would no longer nude the main Movie onto action - so the stop would be permanent.

Well that is all there is to it. Enjoy.

 

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

         

Step 9    <<   Previous      Intro   1   2   3   4   5   6   7   8   9    >>       >>   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

64385 visitors to this page since 6 Oct 05 •

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 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.