• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 7. Controlling the Movie Clip > Creating Shapes Dynamically

Creating Shapes Dynamically

A special category of movie clip methods is reserved for creating lines, curves, fills, and gradients. These methods are the drawing methods of the movie clip. With these methods, you can create your own shapes and control their color, transparency, stroke width, and even the kind and placement of gradient fills. You could use the drawing methods to create your own simple paint and coloring application, or you could draw bar graphs or pie charts or connect data points to visualize numerical data that your viewer inputs.

To use the drawing methods, you must start with a movie clip. The movie clip acts as the point of reference for all your drawing coordinates. So if your movie clip is anchored at the top-left corner of the Stage (at x = 0, y = 0), all the drawing coordinates are relative to that registration point. The movie clip also acts as though it were a pen tip, anchoring the start of a line or curve and keeping track of its end point as you tell it to draw. The movie clip doesn’t actually move, however. Think of the movie clip as being a virtual pen tip.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint