Testing Download Time

If you're planning to publish your animation on the Web, you need to know how long it takes your animation to download from a web server to somebody's computer. Chapter 20 gives you several optimization techniques, including tips for preloading content and reducing your animation's file size; but before you begin to optimize your animation, you need to know just how bad the situation is and where the bottlenecks are. The following sections show you how.

You could set up a bank of test machines, each connected to the Internet at a different transfer speed, to determine the average download time your audience will eventually have to sit through. But Flash gives you an easier option: simulating downloads at a variety of transfer speeds with the click of a button. The simulation takes into consideration any additional, non-Flash media files that you've included in your animation, like sound and video clips.

To simulate different download speeds:

  1. Choose Control→Test Movie→in Flash Professional.

    The Flash Player (test window) appears.

  2. Select View→Download Settings (Figure 19-6), and then, from the submenu, select the connection speed you expect your audience to be running.

    Your choices range from 14.4 (1.2 KB/s) to T1 speed (131.2 KB/s). If you need to simulate a faster speed, check out Figure 19-7.

  3. Choose View→Simulate Download.

    The test window clears, and Flash plays your animation at the rate it would play it if it had to download your file from a web server at the connection speed you chose in step 2.

  4. Repeat steps 2 and 3 for each connection speed you want to test.

If you're like most folks, you'll find that your animation takes too long to play at one—or even all—of the simulated connection speeds you test. Fortunately, Flash gives you additional tools to help you pinpoint which frames take longest to download (so that you know which frames to optimize). Read on for details.

Simulating downloads at different connection speeds gives you a general, overall feel for whether you'll need to optimize your animation or give your audience a low-bandwidth alternative (or both). But to get more precise information, like which frames represent the greatest bottlenecks, turn to the bandwidth profiler report (Figure 19-8).

To generate a bandwidth profiler report:

  1. Choose Control→Test Movie→in Flash Professional.

    The Flash Player (test window) appears containing your running animation.

  2. In the test window, select View→Bandwidth Profiler.

    In the top half of the window, Flash displays a report similar to the one in Figure 19-8.

  3. Select View→Frame By Frame Graph.

    The graph Flash displays when you choose the Frame By Frame option makes detecting rogue frames much easier than if you stick with Flash's suggested View→Streaming Graph option shown in Figure 19-8. Figure 19-9 has an example of a Frame By Frame graph.

  4. Select View→Simulate Download.

    The progress bar at the top of the bandwidth profiler report moves as Flash simulates a download.

The report gives you information you can use to figure out which frames of your animation are hogging all the bandwidth. You'll find a timeline and a playhead at the top of the report. As your animation plays, the playhead moves along the timeline to help you see at a glance which frames are causing Flash to display those tall bandwidth-hogging frame bars. Preload, the most useful number, tells you how long your audience has to sit and wait before your animation begins. These are the details you'll find in the bandwidth profiler report:

If your animation played just fine, try testing it using a slower simulated connection. (Your goal is to make sure as much of your potential audience can enjoy your animation as possible—even folks running over slow connections and congested networks.) To do this test, redisplay the bandwidth profiler report, this time using a different connection simulation speed: