Chapter 28. Sharing and Loading Assets

Because most Flash movies are downloaded and viewed over the Web, ActionScript 3.0 has a number of advanced actions that are dedicated solely to controlling the download and display of movies and library assets. Actions that check the loaded bytes of a Flash movie file (.swf) or media file let developers prevent a movie from playing before a specified portion of it has finished loading. The Loader class enables Flash content to be broken into small pieces or assets that are downloaded only when they are needed.

Tip

ActionScript 3.0 can load PNG, GIF, and progressive JPEG images into your Flash movies, in addition to MP3, .flv, and .swf files. We show you how to load these media files in this chapter.

Note

This chapter discusses ActionScript 3.0 implementations of asset loading and sharing. For legacy ActionScript 2.0 applications, refer to earlier editions of the Flash Bible series (Wiley).

Managing Smooth Movie Download and Display

When Flash movies are played back over the Internet, they progressively download, meaning that the Flash Player plug-in shows as much of the movie as it can during download, even if the whole file has not been transferred to the user's system or browser cache. The benefit ...

Get Adobe® Flash® CS4 Professional Bible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.