Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

35.1. Overview

This chapter needs to cover a lot of ground. A high-level view of the drawing API helps you keep oriented as you learn about the details of each part.

The classes involved in the drawing API are part of the flash.display package. Primarily, you'll be using the Graphics class, which acts as a canvas for drawing vector graphics. The Graphics class is an abstract class; you can't create instances of it directly with new Graphics(). Furthermore, it's not a DisplayObject, so you can't add it to the display list. To get your vector drawings on stage, you use the existing Graphics instances that are attached to all your favorite display objects: Sprite, MovieClip, and Shape. Each of these classes has a public property called graphics that you can access to draw programmatically into the instance.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial