Chapter 11. Drawing and Color

DYNAMICALLY DRAWING SHAPES, lines, and even graphs with the Drawing API is one of the benefits of using ActionScript. Add color and gradients to the list and there are no limits.

This chapter covers the major renovations that have occurred in the ActionScript Drawing API and new ways to apply color transformations.


Borders, graphs, and outlines are just a few of the graphics that can be drawn using lines. Lines are essentially the same in ActionScript 2 and 3, including joint and caps styles, a line scale mode, color, and size. However, while the lines are the same, the way they are created has been updated to a more object-oriented approach.

AS2: Lines

ActionScript 2 includes drawing in the MovieClip class. The ...

Get The ActionScript™ 3.0 Migration Guide: Making the Move from ActionScript 2.0 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.