Section 13.5. Testing Download Time


13.5. Testing Download Time

If 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 Downloads

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, such as sound and video clips.

To simulate different download speeds:

  1. Choose Control Test Movie .

    The Flash Player (test window) appears.

  2. In the test window, select View Download Settings (Figure 13-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 kbps) to T1 speed (131.2 kbps). If you need to simulate a faster speed, check out Figure 13-7.


    Note: Unless you're planning to allow only certain folks to view your animation (for example, students in your company's training classes), you can't possibly know for sure what connection rates your audience will be using. The best approach is to test a likely range. If the animation plays excruciatingly slowly at the lowest connection speed in your test range, consider either optimizing or offering a low-bandwidth version. Chapter 14 (Section 14.1), tells you how.
  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 3.

  4. Repeat steps 3 and 4 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 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 Download Settings Customize and type a label and the new transfer speed you want to test (from 1 byte per second to 100,000,00).

13.5.1.1. Pinpointing bottlenecks with a bandwidth profiler report

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

The report gives you information you can use to figure out which frames of your animation are hogging all the bandwidth. There are 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 will have to sit and wait before your animation begins playing. Additional download details in the bandwidth profiler report include:

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 Publish Settings Flash, and then turn on the checkbox next to "Generate size report." Make sure you can see the Output window (Window Output). Then, when you choose File Publish, Flash displays the size report in the Output window. It also automatically generates a text file named yourFlashFile Report.txt that you can pull into a text editor or word processor.


Figure 13-8. Flash assumes you want it to display your bandwidth reports in Streaming Graph format, as shown here, unless you tell it otherwise . Unfortunately, analyzing the graph on this kind of report can be tricky; to match a stacked segment to a particular frame, you have to click the stacked segment. When you do, Flash displays the associated frame in the Frame field on the left side of the report.

  • 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:

  1. Choose Control Test Movie .

    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 13-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 13-8. Figure 13-9 has an example of a Frame By Frame graph.

  4. Simulate Download.

    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.

  1. Choose View Download Settings .

    A submenu menu appears, showing a list of possible connection simulation speeds, such as 28.8, 56K, and T1.

    Figure 13-9. On the left side of this Frame By Frame bandwidth profiler report, you see animation properties pertinent to playback, including the .swf file size and the Stage dimensions and frame rate you set in Flash. The right side of the report shows you a frame-by-frame picture of the download process. Frame bars that appear above the red line (here, Flash has drawn the red line at 400B) mean a wait for data. So Frame 1, along with most of the frames between Frame 10 and Frame 22, are the culprits in this slow-playing animation; at a connection speed of 56 kbps, they make Flash pause the animation while they're being downloaded.
  2. 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).




Flash 8
Flash Fox and Bono Bear (Chimps) (Chimps Series)
ISBN: 1901737438
EAN: 2147483647
Year: 2006
Pages: 126
Authors: Tessa Moore

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