Article
Optimize Preloading with Flash 5
Flash movies are renowned for being compact and light in file size. That said, it's amazing how large those compact files can get when audio and a lot of imported graphics are used in a movie.
Fortunately, Flash, with its built-in ActionScript technology, can be optimized to preload each section of a movie before it's played. Graphics, scenes, and even whole movies can be downloaded as the rest of the movie plays, which can significantly optimize the experience a cus-tomer has with your site.
Getting Started
To begin with, we'll write a script that will play an animation while the rest of the movie preloads before it starts to play. This is similar to the many "Movie is downloading, please wait..." animations you see on Websites.
To start, open a file and save it as Simple_Preloader.fla. The movie opens up with a default of just one scene. For the preload script to work a second scene must be added. To do this, select Insert -- Scene, as shown here.

The Preloader script is going to be placed into Scene 1, but before we do this let's add some content to scene two. Open Scene two, and add two layers: call one layer "Scripts" and the other "Content". Make each layer five frames long.
Next, select the "Content" layer and add the following text: This is Scene 2.

In a production Flash movie this is the section where you will place the main movie. Scene two can be as large and long as you like. When you have finished with the Simple_Preloader, why not experiment with it -- add a scene from a complex animation that you've written.
Select the "Scripts" layer. Choose frame 5 and open the ActionScript Inspector. From the Basic Actions drag a "Stop" action on the ActionScript editor window.

Matthew’s most recent publications include Flash MX Magic (New Riders), Flash MX Game Design f/x & Design (Coriolis) and content for Everything Ever Needed to Know about Live Motion 2.0, Flash 5 Magic, Inside Dreamweaver 4, Flash 5: Visual FX, Web Publishing Bible and The Dreamweaver Bible.
Visit him at