Chapter 13. Working with DisplayObjects in Flash CS3
Introduction
In this chapter
Embedding images and vector graphics with Flash CS3 and Flex
Setting up linkages to automatically generated and custom classes
Accessing embedded graphics from your code
Despite AS3's improved display list and drawing capabilities, in most cases, drawing graphics from scratch using code is far too tedious to be practical. Likewise, loading graphics from external files can be complicated and may be too much trouble for smaller applications. In fact, for many situations, you will likely be working with Flash CS3's timeline and drawing tools and Flash and Flex's ability to embed graphic and SWF files into classes for use in code.
While embedding assets allows you to load them at the same time as your SWF and work with them directly, all embedded assets will add to the total file size of your program. In ActionScript 3.0, embedded assets are stored as classes and can be accessed and instantiated in your code. Flash CS3 has improved the way that DisplayObjects are handled in code even on the timeline. The new abilities of the display list allow you to create symbols that use the classes in the flash.display
package or a custom subclass.
Creating Symbols Within Flash CS3
A symbol is a reusable piece of graphics, sound, animation, or other media stored within your Flash file. In timeline‐based Flash, symbols are used to create the visual aspects of your program. Creating symbols in Flash CS3 works very much the ...
Get ActionScript™ 3.0 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.