13.5. Testing Download TimeIf you're planning to publish your animation on the Web, you need to know about how long it takes your animation to download from a Web server to somebody's computer. Chapter 14 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. 13.5.1. Simulating DownloadsYou 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, such as sound and video clips. To simulate different download speeds:
If you're like most folks, you'll find that your animation takes too long to play at oneor even allof 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. Figure 13-6. If you're used to testing your animation inside the Flash development environment, you'll be shocked when you see how long it takes to download and play your animation over the Web. Flash automatically adjusts for standard line congestion to give you a more realistic picture. So, for example, when you choose the 14.4 kbps setting, Flash actually simulates the transfer at the slightly lower rate of 12.0 kbps.![]() Figure 13-7. To keep up with the latest advances in transfer technology, you can select a faster transfer rate than any of the options Flash offers. To do so, select View |
GEM IN THE ROUGH Size Reports |
Flash offers a second statistical report called a size report . This report is much less useful than the bandwidth profiler report in terms of testing, because all it describes is how much of your .fla file is devoted to each frame, scene, and so forthand typically, it's the .swf file you're interested in, because that's the file that your audience downloads. But you may find the size report useful if you want to print out a record of all the ActionScript actions, scenes, symbols and fonts you've included in your animation. To create a size report, choose File |
Dimensions . The width and height of the Stage in pixels (Section 1.7.2).
Frame rate . The frame rate you set for this animation (Section 10.1.1).
Size . The size of the .swf file Flash created when you exported ( began testing) the movie.
Duration . The number of frames in this animation, followed by the number of seconds the frames take to play based on the frame rate you set.
Preload . The total number of seconds it takes Flash to begin playing the animation at the bandwidth setting you chose (see Section 14.2).
Bandwidth . The connection simulation speed you chose by selecting View Download Settings.
Frame . The frame Flash is currently loading.
KB . The percentage of the total file (and number of frames) Flash has currently loaded.
Loaded . The number of kilobytes Flash has currently loaded.
To generate a bandwidth profiler report:
Choose Control Test Movie .
The Flash Player (test window) appears containing your running animation.
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 13-8.
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 13-8. Figure 13-9 has an example of a Frame By Frame graph.
The progress bar at the top of the bandwidth profiler report moves as Flash simulates a download.
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 possibleeven 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, as described next.
Choose View Download Settings .
A submenu menu appears, showing a list of possible connection simulation speeds, such as 28.8, 56K, and T1.
Choose the new simulation speed you want to test. Then choose View Simulate Download again .
A new bandwidth profiler report appears, based on the new connection speed (Figure 13-10).