Document.space() – Adobe Extending Flash Professional CS4 User Manual
Page 184

162
EXTENDING FLASH CS4 PROFESSIONAL
Document object
Usage
document.sourcePath
Description
Property; a string that contains a list of items in the document’s ActionScript 3.0 Source path, which specifies the
location of ActionScript class files. Items in the string are delimited by semi-colons. In the authoring tool, the items
are specified by choosing File > Publish Settings and then choosing ActionScript 3.0 Script Settings on the Flash tab.
Example
The following example adds the ./Class files folder to the document’s Source path:
var myDoc = fl.getDocumentDOM();
fl.trace(myDoc.sourcePath);
myDoc.sourcePath = "./Class files;" + myDoc.sourcePath;
fl.trace(myDoc.sourcePath);
See also
,
document.space()
Availability
Flash MX 2004.
Usage
document.space(direction [, bUseDocumentBounds])
Parameters
direction
A string that specifies the direction in which to space the objects in the selection. Acceptable values are
"horizontal"
or
"vertical".
bUseDocumentBounds
A Boolean value that, when set to
true
, spaces the objects to the document bounds. Otherwise,
the method uses the bounds of the selected objects. The default is
false
. This parameter is optional.
Returns
Nothing.
Description
Method; spaces the objects in the selection evenly.
Example
The following example spaces the objects horizontally, relative to the Stage:
fl.getDocumentDOM().space("horizontal",true);
The following example spaces the objects horizontally, relative to each other:
fl.getDocumentDOM().space("horizontal");