Extending Flash |
|
|
|
| Objects > Document object > document.setCustomStroke() | |||
Flash MX 2004.
document.setCustomStroke(stroke)
stroke A Stroke object.
Nothing.
Method; sets the stroke settings for the Tools panel, 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 Tools panel and Property inspector stroke settings.
The following example changes the stroke thickness setting in the Tools panel, Property inspector, and any selected shapes:
var stroke = fl.getDocumentDOM().getCustomStroke(); stroke.thickness += 2; fl.getDocumentDOM().setCustomStroke(stroke);
|
|
|
|