User Guide
drawingLayer object 135
drawingLayer object
Availability
Flash MX 2004.
Description
The drawingLayer object is accessible from JavaScript as a child of the flash object. The
drawingLayer object is used for extensible tools when the user wants to temporarily draw while
dragging—for example, when creating a selection marquee. You should call
drawingLayer.beginFrame() before you call any other drawingLayer methods.
Method summary for the drawingLayer object
The following methods are available for the drawingLayer object:
drawingLayer.beginDraw()
Availability
Flash MX 2004.
Usage
drawingLayer.beginDraw([persistentDraw])
Methods Description
drawingLayer.beginDraw() Method; puts Flash in drawing mode.
drawingLayer.beginFrame() Method; erases what was previously drawn using the drawingLayer
and prepares for more drawing commands.
drawingLayer.cubicCurveTo() Method; draws a cubic curve from the current pen location using the
parameters as the coordinates of the cubic segment.
drawingLayer.curveTo() Method; draws a quadratic curve segment starting at the current
drawing position and ending at a specified point.
drawingLayer.drawPath() Method; draws the specified path.
drawingLayer.endDraw() Method; exits drawing mode.
drawingLayer.endFrame() Method; signals the end of a group of drawing commands.
drawingLayer.lineTo() Method; draws a line from the current drawing position to the point
(x,y).
drawingLayer.moveTo() Method; sets the current drawing position.
drawingLayer.newPath() Method; returns a new Path object.
drawingLayer.setColor() Method; sets the color of subsequently drawn data.
CHAPTER 3
Objects