Fl.sourcepath, Fl.swfpanels – Adobe Extending Flash Professional CS5 User Manual
Page 281
259
EXTENDING FLASH PROFESSIONAL
flash object (fl)
Last updated 5/2/2011
fl.sourcePath
Availability
Flash CS4 Professional.
Usage
fl.sourcePath
Description
Property; a string that contains a list of items in the global 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 Edit > Preferences
> ActionScript > ActionScript 3.0 Settings.
Example
The following example adds the /Classes folder to the global ActionScript 3.0 Source path:
fl.trace(fl.sourcePath);
fl.sourcePath = "/Classes;" + fl.sourcePath;
fl.trace(fl.sourcePath);
See also
fl.swfPanels
Availability
Flash CS4 Professional.
Usage
fl.swfPanels
Description
Read-only property; an array of registered swfPanel objects (see
). A swfPanel object is registered if it
has been opened at least once.
A panel’s position in the array represents the order in which it was opened. If the first panel opened is named
TraceBitmap and the second panel opened is named AnotherFunction, then
fl.swfPanels[0]
is the TraceBitmap
swfPanel object,
fl.swfPanels[1]
is the AnotherFunction swfPanel object, and so on.
Example
The following code displays the name and path of any registered Window SWF panels in the Output panel:
if(fl.swfPanels.length > 0){
for(x = 0; x < fl.swfPanels.length; x++){
fl.trace("Panel: " + fl.swfPanels[x].name + " -- Path: " + fl.swfPanels[x].path);
}
}