Document.setfillcolor(), Document.setfilterproperty() – Adobe Extending Flash Professional CS5 User Manual
Page 165
143
EXTENDING FLASH PROFESSIONAL
Document object
Last updated 5/2/2011
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
.
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.
fl.getDocumentDOM().setFillColor("#cc00cc");
fl.getDocumentDOM().setFillColor(0xcc00cc);
fl.getDocumentDOM().setFillColor(120000);
fl.getDocumentDOM().setFillColor(null);
document.setFilterProperty()
Availability
Flash 8.
Usage
document.setFilterProperty(property, filterIndex, value)
Parameters
property
A string specifying the property to be set. Acceptable values are
"blurX"
,
"blurY"
,
"quality"
,
angle"
,
"distance"
,
"strength"
,
"knockout"
,
"inner"
,
"bevelType"
,
"color"
,
"shadowColor"
, and
"highlightColor".
filterIndex
An integer specifying the zero-based index of the filter in the Filters list.