document.setFillColor()

Availability

Flash MX 2004.

Usage

document.setFillColor(color)

Parameters

color The color of the fill, in one of the following formats:

If set to null, no fill color is set, which is the same as setting the Fill color swatch in the user interface to no fill.

Returns

Nothing.

Description

Method; changes the fill color of the selection to the specified color. For information on changing the fill color in the Tools panel and Property inspector, see document.setCustomFill().

Example

The first three statements in the following example set the fill color using each of the different formats for specifying color. The fourth statement sets the fill to no fill.

flash.getDocumentDOM().setFillColor("#cc00cc");
flash.getDocumentDOM().setFillColor(0xcc00cc);
flash.getDocumentDOM().setFillColor(120000);
flash.getDocumentDOM().setFillColor(null);