Document.name, Document.optimizecurves() – Adobe Extending Flash Professional CS4 User Manual
Page 145
123
EXTENDING FLASH CS4 PROFESSIONAL
Document object
document.name
Availability
Flash MX 2004.
Usage
document.name
Description
Read-only property; a string that represents the name of a document (FLA file).
Example
The following example sets the variable
fileName
to the filename of the first document in the documents array:
var fileName = flash.documents[0].name;
The following example displays the names of all the open documents in the Output panel:
var openDocs = fl.documents;
for(var i=0;i < openDocs.length; i++){
fl.trace(i + " " + openDocs[i].name +"\n");
}
document.optimizeCurves()
Availability
Flash MX 2004.
Usage
document.optimizeCurves(smoothing, bUseMultiplePasses)
Parameters
smoothing
An integer in the range from 0 to 100, with 0 specifying no smoothing and 100 specifying maximum
smoothing.
bUseMultiplePasses
A Boolean value that, when set to
true
, indicates that the method should use multiple passes,
which is slower but produces a better result. This parameter has the same effect as clicking the Use Multiple Passes
button in the Optimize Curves dialog box.
Returns
Nothing.
Description
Method; optimizes smoothing for the current selection, allowing multiple passes, if specified, for optimal smoothing.
This method is equivalent to selecting Modify > Shape > Optimize.
Example
The following example optimizes the curve of the current selection to 50º of smoothing with multiple passes: