Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The Graphics class is the foundation for drawing vectors with code. You use methods of this class to define line and fill styles, and draw lines, curves, and shapes, similar to how you would by using the Flash interface.
Before we get started with syntax-specific discussions, however, here’s a quick word of advice about where to draw your vectors. It is possible to draw vectors directly into the main timeline, but we recommend that you first create one or more movie clips or sprites to serve as canvases for your drawings. This is analogous to an artist drawing on a canvas instead of a studio wall—which makes it a lot easier to move a masterpiece around or exhibit it in a gallery. The same is true of virtual canvases in movie clips.