118
Chapter 3: Objects
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
A color string in hexadecimal #rrggbb format (where
r
is red,
g
is green, and
b
is blue), a
hexidecimal color value (such as, 0xff0000), or an integer color value. 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 toolbar 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);
document.setInstanceAlpha()
Availability
Flash MX 2004.
Usage
document.setInstanceAlpha(
opacity
)
Parameters
opacity
An integer between 0 (transparent) and 100 (completely saturated) that adjusts the
transparency of the instance.
Содержание FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY
Страница 1: ...Flash JavaScript Dictionary ...
Страница 16: ...16 Contents ...
Страница 40: ...40 Chapter 2 Top level functions ...
Страница 368: ...368 Chapter 3 Objects ...
Страница 386: ...386 Chapter 4 C Level Extensibility ...