User Guide

drawingLayer object 141
drawingLayer.setColor()
Availability
Flash MX 2004.
Usage
drawingLayer.setColor(color)
Parameters
color
A color that is specified by a string, integer, or hexadecimal value.
Returns
Nothing.
Description
Method; sets the color of subsequently drawn data. Applies only to persistent data. To use this
method, the parameter passed to
drawingLayer.beginDraw() must be set to true. You typically
use this method only when creating extensible tools.
Example
The following example draws a red line on the Stage:
fl.drawingLayer.beginDraw( true );
fl.drawingLayer.beginFrame();
fl.drawingLayer.setColor( "#ff0000" );
fl.drawingLayer.moveTo(0,0);
fl.drawingLayer.lineTo(100,100);
fl.drawingLayer.endFrame();
fl.drawingLayer.endDraw();