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. ...

Get Foundation ActionScript 3, Second Edition now with O’Reilly online learning.

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