Using the drawing API

Although imported images and artwork are important, the functionality known as the drawing API, which allows you to draw lines and shapes in ActionScript, gives you the freedom to start an application with the computer equivalent of a blank canvas, on which you can create whatever images you wish. The ability to create your own graphics opens up broad possibilities for your applications. With the techniques covered in this chapter you can create a drawing program, make animated, interactive art, or programmatically create your own user interface elements, among many possibilities.

Contents

Basics of using the drawing API
Understanding the Graphics class
Drawing lines and curves
Drawing shapes using built-in methods
Creating gradient lines and fills
Using the Math class with drawing methods
Animating with the drawing API
Example: Algorithmic Visual Generator

Flash CS3