User Guide
Document object 149
Example
The following examples set the fillColor, italic, and bold text attributes for the
selected text items:
var success = fl.getDocumentDOM().setElementTextAttr("fillColor",
"#00ff00");
var pass = fl.getDocumentDOM().setElementTextAttr("italic", true, 10);
var ok = fl.getDocumentDOM().setElementTextAttr("bold", true, 5, 15);
document.setFillColor()
Availability
Flash MX 2004.
Usage
document.setFillColor( color )
Parameters
color The color of the fill, in one of the following formats:
■ A string in the format "#RRGGBB" or "#RRGGBBAA"
■ A hexadecimal number in the format 0xRRGGBB
■ An integer that represents the decimal equivalent of a hexadecimal number
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);