Bandwidth Profiler


Flash movies play frame-by-frame. A frame cannot play until all the information it needs has downloaded; the playback of the movie pauses until all the information is available. The Bandwidth Profiler gives you a graphical view of how your file is downloading. You can use the Bandwidth Profiler to answer these important questions:

  • Are there sections of the file at which there will be too much information for Flash to stream effectively?

  • How does the file stream at different connection speeds?

  • How much of the file needs to load before it plays back smoothly?

As you saw earlier, to use the Bandwidth Profiler, just test your movie (Control > Test Movie) and then choose View > Bandwidth Profiler. (See Figure 5.11.) The Bandwidth Profiler is displayed above your Flash movie.

Figure 5.11. The Bandwidth Profiler gives you a lot of information about your movie's playback at different download rates. The default display is the Streaming Graph.

graphics/05fig11.gif

When you use the Bandwidth Profiler, you can simulate how your file would perform at different download speeds. All you have to do is choose Debug from the main menu and then select 14.4Kb, 28.8Kb, or 56Kb. Alternately, you can customize the download settings by choosing Debug > Customize and then entering the speeds at which you want to test.

After you choose a download speed at which to test, you have several options for viewing your file's performance. By default, the Bandwidth Profiler displays a Streaming Graph of your movie. The left side of the Bandwidth Profiler displays information about your movie, including the following:

  • Dimensions (Dim). This gives the height and width of the movie.

  • Frame Rate (Fr Rate). This gives the frame rate at which the movie is set.

  • Size . This is the total file size in KB.

  • Duration. This is the total number of frames and playback time on the main timeline.

  • Preload. This doesn't seem to be documented anywhere . It appears to be the total number of frames (including all movie clips) that need to preload to ensure smooth playback and how many seconds those frames will take to download.

  • Bandwidth. This is the bandwidth rate at which you are testing.

  • Frame. This is the frame number on which the Playback head is currently located.

  • Loaded. This is the total number of frames currently loaded (main timeline).

On the right side of the Bandwidth Profiler is the Streaming Graph. The Streaming Graph is interesting because it gives you immediate visual clues about where the slow- downs in your movie are. Frames are represented by alternating dark gray and light gray bars. The height of the bar indicates how many kilobytes of information have to be downloaded for that frame. That means that frames with only small amounts of information are stacked on top of each other, giving a striped effect. You'll notice something else interesting here. See that red line? That's the red line of death. If the bar for a frame extends above the red line, that indicates that you might see a pause in your movie at that point. Simply put, there's too much information in that frame to ensure uninter-rupted playback. Click one of the frame bars, and the movie moves to that point.

The Streaming Graph isn't the only view you have of the Bandwidth Profiler, it's just the default view. You also can view a Frame-by-Frame Graph, or, if you really want to share your viewers ' experience, you can set the View to Show Streaming.

The Frame-by-Frame Graph is similar to the Streaming Graph. Instead of showing you how the file streams, it shows you exactly how much information is in each frame. (See Figure 5.12.) Thus, you can quickly isolate your problem frames.

Figure 5.12. You can choose to view how your file streams frame-by-frame. This is particularly useful when you are trying to isolate problem areas in your file.

graphics/05fig12.gif

Show Streaming can be a real eye-opening experience. For whatever bandwidth you set to test at, you can sit and watch and see how your movie actually loads at Internet speed. (See Figure 5.13.) Remember that the entire frame has to load before it can play, so if you have a lot of information in the first frame, a lot of nothing might happen for a while. Depending on how you set your layers to load, bottom up or top down, you have a little bit of control over what your viewer sees.

Figure 5.13. The Show Streaming view of the Bandwidth Profiler lets you see what your viewers see as your file downloads. This can be a real eye-opening experience. Use it.

graphics/05fig13.gif

In Exercise 5.4, you look at a movie that has some download problems. You use the Bandwidth Profiler to isolate and help you remedy those problems.

Exercise 5.4 Using the Bandwidth Profiler

You're going to use the Bandwidth Profiler to find the problems in this movie and to come up with a strategy to fix them.

  1. Open the magnatec.fla file from the Chapter_05/Assets folder on the CD. Choose Control > Test Movie and open the Bandwidth Profiler if it isn't already open .

  2. Set the bandwidth to 56KB by choosing Debug > 56KB.

    You should be able to tell right away that there is a problem here. You have five frames that are spiking substantially above the red line.

  3. Switch to Show Streaming (View > Show Streaming) if you want a real indicator of how long your viewers are going to have to wait to see anything. It's a good 24 seconds before the entire frame loads. That's too long.

  4. Choose View > Frame by Frame Graph. There should be no question about where the problems are: Frames 1, 30, 31, 32 and 33 are all problems. Of these, frame 1 is the most problematic .

Note

Although 28.8 modems theoretically have a download rate of 3.5KBps, Flash simulates the download at 2.3KBps. Why? Because this more accurately reflects the average performance on the Internet. Your mileage might vary.


Okay, so you've tested your file and you found some potential download problems. How do you go about solving them? Well, there are a few questions you can ask:

  • Can some of the information that is currently loaded in the problematic frames be moved to another frame?

  • Can some of the movie clips that are used be changed to external SWF files that are loaded on demand?

  • Do I need to preload the information in my file?

Before you start rearranging, take a moment to look at another tool you can use to give you some more information about what is going on in your filethe Size Report.



Inside Flash
Inside Flash MX (2nd Edition) (Inside (New Riders))
ISBN: 0735712549
EAN: 2147483647
Year: 2005
Pages: 257
Authors: Jody Keating

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net