About creating progress animations for media files

ActionScript provides several ways to preload or track the downloading progress of external media. You can create progress bars or animations to visually show the loading progress or the amount of content that has loaded.

To preload SWF and JPEG files, use the MovieClipLoader class, which provides an event listener mechanism for checking downloading progress. For more information, see "Preloading SWF and JPEG files" on page 427.

To track the downloading progress of MP3 files, use the Sound.getBytesLoaded() and Sound.getBytesTotal() methods; to track the downloading progress of FLV files, use the NetStream.bytesLoaded and NetStream.bytesTotal properties. For more information, see "Preloading MP3 files" on page 420.

For information on creating progress bars to load media files, see the following topics:

For a sample source file that uses scripted animation to create a progress bar animation, tweenProgress.fla, see the Flash Samples page at www.adobe.com/go/learn_fl_samples. Download the Samples zip file and navigate to the ActionScript2.0/Tween Progressbar folder to access this sample.


Flash CS3


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00001042.html