![MACROMEDIA FLASH 8-EXTENDING FLASH Manual Download Page 110](http://html1.mh-extra.com/html/macromedia/flash-8-extending-flash/flash-8-extending-flash_manual_3348049110.webp)
110
Objects
document.getCustomFill()
Availability
Flash MX 2004.
Usage
document.getCustomFill( [
objectToFill
] )
Parameters
objectToFill
A string that specifies the location of the fill object. The following values
are valid:
■
"toolbar"
returns the fill object of the Tools panel and Property inspector.
■
"selection"
returns the fill object of the selection.
If you omit this parameter, the default value is
"selection"
. If there is no selection, the
method returns
undefined
. This parameter is optional.
Returns
The
Fill object
specified by the
objectToFill
parameter, if successful; otherwise, it returns
undefined.
Description
Method; retrieves the fill object of the selected shape or, if specified, of the Tools panel and
Property inspector.
Example
The following example gets the fill object of the selection and then changes the selection’s
color to white:
var fill = fl.getDocumentDOM().getCustomFill();
fill.color = '#FFFFFF';
fill.style = "solid";
fl.getDocumentDOM().setCustomFill(fill);
The following example returns the fill object of the Tools panel and Property inspector and
then changes the color swatch to a linear gradient:
var fill = fl.getDocumentDOM().getCustomFill("toolbar");
fill.style = "linearGradient";
fill.colorArray = [ 0x00ff00, 0xff0000, 0x0000ff ];
fill.posArray = [0, 100, 200];
fl.getDocumentDOM().setCustomFill( fill );
See also
document.setCustomFill()
Summary of Contents for FLASH 8-EXTENDING FLASH
Page 1: ...Extending Flash...
Page 38: ...38 Top Level Functions and Methods...
Page 532: ...532 Objects...
Page 554: ...554 C Level Extensibility...