Chapter 12. Loading Assets on the Fly


In this chapter
Using ActionScript to Modularize Content
Preloading


This chapter focuses almost entirely on solving one problem: keeping initial download times to a minimum without compromising too much quality or creativity. This goal can be accomplished in several ways, and each approach has its merits. Perhaps the method that achieves the most successful mix of optimization and quality, however, is loading assets on demand.

Flash projects are often more complex than what we've created so far in this book. Web sites, photo galleries, presentations, printable advertisements, and many other projects can all be created with Flash, and it is rarely an economical use of file size to cram all the necessary assets into one .swf. Adding 1 bitmap image to a Flash project may not affect the file size much, but adding 10 can really make a difference.

Splitting projects into multiple pieces and loading each module only when it's required is key to creating Flash content that runs smoothly and loads quickly. You may be thinking that using external assets simply shifts the download burden to a later time. That's true, but the point is that the external content may never be needed and, therefore, may never be loaded.

Another benefit of external assets is that they make complex Flash projects easier to manage and update. A modular structure can speed up development significantly, for a variety of reasons. First, smaller files are typically easier to work with during authoring. This is especially true if a file has a lot of audio or graphics that must be recompressed during each export. Second, if a project is modularized, more than one person can usually work on it simultaneously. Designers, programmers, content developers, and testers can all work together by focusing on individual pieces of the big picture.



Flash 8(c) Projects for Learning Animation and Interactivity
Flash 8: Projects for Learning Animation and Interactivity (OReilly Digital Studio)
ISBN: 0596102232
EAN: 2147483647
Year: 2006
Pages: 117

Similar book on Amazon

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