User Guide

116 Chapter 3: Objects
Example
The following example changes the color of the fill color swatch in the toolbar, Property
inspector, and any selected shapes to white:
var fill = fl.getDocumentDOM().getCustomFill();
fill.color = '#FFFFFF';
fill.style = "solid";
fl.getDocumentDOM().setCustomFill(fill);
document.setCustomStroke()
Availability
Flash MX 2004.
Usage
document.setCustomStroke( stroke )
Parameters
stroke
A Stroke object.
Returns
Nothing.
Description
Method; sets the stroke settings for the toolbar, Property inspector, and any selected shapes. This
allows a script to set the stroke settings before drawing the object, rather than drawing the object,
selecting it, and changing the stroke settings. It also lets a script change the toolbar and Property
inspector stroke settings. See
document.getCustomStroke().
Example
The following example changes the stroke thickness setting in the toolbar, Property inspector, and
any selected shapes:
var stroke = fl.getDocumentDOM().getCustomStroke();
stroke.thickness += 2;
fl.getDocumentDOM().setCustomStroke(stroke);
document.setElementProperty()
Availability
Flash MX 2004.
Usage
document.setElementProperty( property
, value )
Parameters
property
A string that specifies the name of the Element property to set. For a complete list of
properties and values, see “Property summary for the Element object” on page 149.