|
||||||
|
||||||
Tutorial - Preload External Flash Movies with Components

Free
Flash Tutorial
![]()
In this preloader tutorial you will learn how to load an external Flash file into another Flash Movie using the Loader and Progress Bar Components. The use of Components make this is very simple and quick build. You can then break up your Flash project into several Flash movies rather than having one very large Flash file. It also means that the user only needs to wait for that section of the site that they wish to view.
Cross Ref: If you are not using Flash 8 or Flash MX 04 you will need to follow an alternative preloader tutorial. There are many other Flash Pre-Loader tutorials including several which cover loading external Flash Movies and loading multiple external Flash Movies. To ensure that you are following the right tutorial for your needs, you may wish to read a brief description of each: Preloader Tutorial Listings
Example: Download
the Flash file Int 151a
Note: If you can see the Flash Movie (an animation) and not the preloader press Refresh (F5 or try Ctrl + F5) in your Browser. Once a Flash Movie has loaded the Browser may not truly refresh or re-load the Movie. Therefore if you did not see the preloader in action: Click here
Step One: Setting up the Layers
You should now see this in the Timeline:

The three layers.
Step Two: Setting up the Publish Settings


Step Three: The Loader Layer


Note: The Movie Will load from the top left corner and expand out to the bottom right as in the illustration below:
The Movie Loads from the top left corner of the Loader Component.
To resolve this it is necessary to reset the X Y positions of the Loader.
Note: From a design point of view it maybe better to set the width and height to the size of the incoming Movie so that you can see the actual position that it will occupy on the Stage. Form a programming point of view this is not necessary unless you wish to scale your external Movie into the Loader. If you wish to do this you will need to make a minor alteration to the ActionScript below.


Step Four: The Progress Bar Layer


Step Five: The ActionScript Layer - Frame 1
Step Six: The ActionScript Layer - Frame 2
Important: Make sure you change the name of the file to the name of your file: myMovie.swfStrange but True: It is the location of the web page and the Movie that is loading that is important not the location of this preloader Movie! If you wish to move this preloader Movie to a different folder you can. It can also be used several times on several different web pages as long as each time the web page is located in the same place as a Movie called: myMovie.swf. Each version of the Movie myMovie.swf could be a different Movie with different content!
Usually the Main Content Movie would be in the same folder as the web page. If it is not you will need to type a target path like this:
myLoader.contentPath = "images/myMovie.swf";
You may also use a full URL like this:
myLoader.contentPath = "http://www.webwasp.co.uk/images/myMovie.swf";Confused? If you get in a muddle the easiest thing is to have the Web Page, Preloader Movie and Main Movie all in the same folder.
Your Layers should now look like this:
That's it.
Why not try out webwasp's new community. Meet new people, find friends in your area: Webwasp Mates & Dates
•
33891 visitors to this page since
Oct 05 •
|
|
|
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.
|