Flash CS3 Documentation |
|||
| Extending Flash > Objects > drawingLayer object > drawingLayer.setColor() | |||
Flash MX 2004.
drawingLayer.setColor(color)
color The color of subsequently drawn data, in one of the following formats:
"#RRGGBB" or "#RRGGBBAA"0xRRGGBBNothing.
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. See drawingLayer.beginDraw().
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();
Flash CS3
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/9.0/main/00004050.html