• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Lesson 11. Assembling the Complete Proje... > Deploying and Testing the Preloader

Deploying and Testing the Preloader

The preloader movie clip is fully programmed, but it is still sitting in the library. Obviously, your preloader movie clip doesn't do much there; it needs to be deployed.

Return to the main timeline, select frame 1 of the preloader layer, and drag an instance of preloaderMC to the middle of the stage. Select frame 10 of the preloader layer, and choose Insert > Blank Keyframe.

The reason for adding a blank keyframe to frame 10 is that you don't need the preloader to continue in frame 10. When you add a blank keyframe, all of the contents of the preceding frames, in this case the preloader, are removed from the movie.

Test the movie. While in the test movie environment, choose View > Bandwidth Profiler.

As it did at the beginning of the lesson, the movie loaded so quickly that you don't see the preloader. You'll make a change that will enable you to see it in action next.

First, let's take a look at the Bandwidth Profiler. This tool shows a graph of the amount of content in each frame. The red line at the bottom is an estimate of how much Flash can load per second. Any frame that rises above that line, then, is a frame that will be played before it is loaded, causing performance problems.

How much Flash can load per second is relative to the type of connection. For example, a cable modem can download a lot more than 4K per second. By default, the speed Flash uses to test is 56K Modem, but you can change this setting in the Debug menu. 56K is a good setting to test with, however, so I don't recommend that you change it now; just be aware that you can.

You already knew that your movie would not stream well—that's why you built the preloader in the first place. But you haven't yet seen it in action.

Choose View > Show Streaming (or just press Command+Return/Ctrl+Enter again).

By choosing Show Streaming, you cause Flash to emulate the user experience based on the download speed setting in the Debug menu (again, by default, it's 56K Modem). When you do this, you are able to see your preloader in action.

In my tests, the total download took a little over 20 seconds. The preloader appeared after 5 or 6 seconds. Ideally, it would show up immediately, but Flash has to download the frame contents before it can display any of its graphics. Still, a 5- or 6-second wait is much better than a 20-plus-second wait.

Open this file's library if it is not already open. Open lower.fla, and open its library. Drag preloaderMC from the grayed-out upper.fla library into the lower.fla library.

To transfer assets between two files, simply drag from one file's library into the other's.

Move the contents of lower.fla to frame 10, add a preloader layer, and drag an instance of preloaderMC into the first frame of the preloader layer, just as you did in upper.fla.

In this step, you are simply deploying the preloaderMC in a different movie.

Test the movie, with View > Show Streaming checked in the test environment to make sure the preloader works.

You are finished with this project. Test everything you can think of to make sure that nothing is broken.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint