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

The following methods are available for the drawingLayer object:

Method

Description

drawingLayer.beginDraw()

Puts Flash in drawing mode.

drawingLayer.beginFrame()

Erases what was previously drawn using the drawingLayer and prepares for more drawing commands.

drawingLayer.cubicCurveTo()

Draws a cubic curve from the current pen location using the parameters as the coordinates of the cubic segment.

drawingLayer.curveTo()

Draws a quadratic curve segment starting at the current drawing position and ending at a specified point.

drawingLayer.drawPath()

Draws the specified path.

drawingLayer.endDraw()

Exits drawing mode.

drawingLayer.endFrame()

Signals the end of a group of drawing commands.

drawingLayer.lineTo()

Draws a line from the current drawing position to the point (x,y).

drawingLayer.moveTo()

Sets the current drawing position.

drawingLayer.newPath()

Returns a new Path object.

drawingLayer.setColor()

Sets the color of subsequently drawn data.

drawingLayer.setFill()

This method is not available.

drawingLayer.setStroke()

This method is not available.