Library.expandfolder(), Library.finditemindex() – Adobe Extending Flash Professional CS4 User Manual
Page 338
316
EXTENDING FLASH CS4 PROFESSIONAL
library object
Example
The following example opens the item
circle
in the
test
folder of the library for editing:
fl.getDocumentDOM().library.editItem("test/circle");
library.expandFolder()
Availability
Flash MX 2004.
Usage
library.expandFolder(bExpand [, bRecurseNestedParents [, namePath]])
Parameters
bExpand
A Boolean value: if
true
, the folder is expanded; if
false
(the default), the folder is collapsed.
bRecurseNestedParents
A Boolean value: if
true
, all the folders within the specified folder are expanded or
collapsed, based on the value of bExpand. The default value is
false
. This parameter is optional.
namePath
A string that specifies the name and, optionally, the path of the folder to expand or collapse. If this
parameter is not specified, the method applies to the currently selected folder. This parameter is optional.
Returns
A Boolean value:
true
if the item is successfully expanded or collapsed;
false
if unsuccessful or the specified item is
not a folder.
Description
Method; expands or collapses the currently selected or specified folder in the library.
Example
The following example collapses the test folder in the library as well as all the folders within the test folder (if any):
fl.getDocumentDOM().library.expandFolder(false, true, "test");
library.findItemIndex()
Availability
Flash MX 2004.
Usage
library.findItemIndex(namePath)
Parameters
namePath
A string that specifies the name of the item. If the item is in a folder, you can specify its name and path using
slash notation.