|
||||||
|
||||||
Tutorial - Preloading External Flash Movies

Free
Flash Tutorial
Step Eight: The ActionScript
It is the ActionScript on frame 3 of the Main Stage that controls the bulk of the information that needed to preload the external swf Movie.
// Create a Movie Clip to load the swf Movie into
this.createEmptyMovieClip("MyExternallyLoadedSWFMovieHolder", 0);
/* Create a variable to hold the location of where the external swf Movie can be located and the file name of the swf Movie to be loaded in externally as an externally loaded swf Movie. e.g. the path to the image could be like c:\myFolder\MySWFMovie.swf or http://www.MyWebSite.com/myFolder/MySWFMovie.swf or if the swf file is in the same location you can use just the swf file name. */
// Change the URL below:
var MyVariable = "myMovie.swf";
// Set the loaded content's location on the Stage
MyExternallyLoadedSWFMovieHolder._x = 0;
MyExternallyLoadedSWFMovieHolder._y = 0;
// Stop on this frame
stop();
Important: Make sure you change the name of the file to the name of your file: myMovie.swf
Strange 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:
var MyVariable = "images/myMovie.swf";
You may also use a full URL like this:
var MyVariable = "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.
The preloader Movie is now finished!!
|
Why not try out webwasp's new community. Meet new people, find friends in your area: Webwasp Mates & Dates
•
50114 visitors to this page since
6 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.
|