Flash MX How-To: Testing the Size of your Flash Files

This story excerpted from Digital Media Training’s “Inside Flash MX: Production Essentials“.

The biggest challenge for all of us who create in Flash has been and always will be the process of optimizing our files for use on the Web. There are two, somewhat hidden aspects to Flash that help us to quickly determine where our file size is being increased in a Flash movie, and also to figure out how our SWF movies will download so we can also optimize that process.

We must remember what I like to call the “evil twins”: processor speed and download speed. It is very important to keep in mind the lowest common denominator — someone with a computer that has a slow processor and a slow Internet connection — when producing Flash movies. The secret optimization for slow processor speed is that you don’t want the various things happening in your movie to ‘”ding” the processor all at the same time. To determine if we have accomplished this we normally need to work on a slower processor machine. As of yet, there aren’t too many other ways to determine the speed, beyond using some programming to see how fast the target machine is working with your information.

The secret to working with download speed is knowing exactly how Flash “streams” or sends the information in your Flash movie over the pipeline that’s available. Streaming information is how the application divides up and parcels out your movie so it can be shoved through a pipeline to the end-user’s browser.

Before we go any further, let’s first review how SWF movies (the exported SWF document) download off the Web. Usually, a SWF movie is accessed with the browser calling for and reading embed and object tags in an HTML document. The HTML document tells the SWF to play at a certain place at a certain size through the embed and object tags. The HTML document also has to download the Flash movie to the person’s computer — this is through a process called streaming. Streaming is basically the idea of slicing up your entire movie into little bits and sending it through the Internet “pipeline.” If you have a very heavy frame, then that frame has to be split down into its pieces to be sent through the pipeline. Therefore, the Flash streaming process requires that each frame must be downloaded before moving onto the next frame.

We’ll use Flash’s size report to determine places where we might optimize our file size to help both the processor and download speed of our playback. We can also use the Bandwidth Profiler, located in the Test Movie display, which will show us how our movie streams and downloads to our user’s machine.

Size Reports
One of the easiest ways to get information about how much specific objects add to your Flash movie (this includes symbols, sounds, images, and all of the text in your file) is to use a Size Report. Size Reports allow you to troubleshoot and find the elements in your movie that are causing an increase in the overall file size.

To publish a Size Report (see figure 1):

  1. Go to File > Publish Settings.
  2. With the Publish Setting dialog box open, click on the Flash Tab.
  3. In the Flash tab go to Options and select Generate Size Report.
  4. Click on Publish and a size report will be generated.
  5. Click OK to get out of the Publish Setting Dialog.
  6. Go out to your desktop or wherever your files are being saved to (the size report will be sent to the same directory as the FLA document), and locate the size report document.
  7. Open the size report by double clicking.

Figure 1: Generate a Size Report.

The size report will give you information about every single symbol including the byte load of each frame, sound, image, or any other type of information you need so you can figure out where your size is increasing in your Flash document (see figure 2). This is actually quite scientific and extremely cool! For example, you might find that your animation jumps in file size at exactly frame 20. You can then go back into your Flash document and see what’s in frame 20 that’s making the file size increase. You can also discover which symbols might be screwing things up for you, and this will allow you to go and optimize that specific symbol. As an example, if the symbol is a graphic, you can optimize it for the number of points in it, using an optimization technique like Modify > Optimize. This reduces the number of curve points in a selected section of your illustration.

Figure 2: The Size Report shows you plenty of information about the Flash file.

So now that you know where to look to find information about the file size of individual objects in Flash, let’s find where we can learn about the download or streaming of our SWF movie.

Bookmark
Please login to bookmark Close

This article was last modified on January 8, 2023

Comments (1)

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. anonymous

    I enjoyed reading this information. It is a little higher-end than the Element K/Adobe for Dummies articles and I’d like to thank you for putting it up.