Chapter 5. CREATING VECTOR GRAPHICS WITH THE DRAWING API

This chapter covers the following topics:

  • How to draw straight and curved lines programmatically

  • How to create solid and gradient-filled shapes

  • How to alter a stroke's graphic style, including drawing gradient strokes

  • How to combine the drawing API methods to create a complete graphic

  • How to move your graphic in a 3D space

ActionScript 3.0 includes a Graphics class that provides a drawing API, which you can use to create vector graphics through code. Each Sprite or Shape instance you create actually includes a Graphics instance that can be used to draw within its respective parent object. You'll learn how to use this drawing API in this chapter.

Why we need a drawing API

If you're from a design ...

Get Foundation ActionScript 3.0 for Flash and Flex now with O’Reilly online learning.

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