Library.newfolder(), Library.renameitem() – Adobe Extending Flash Professional CS4 User Manual
Page 343
321
EXTENDING FLASH CS4 PROFESSIONAL
library object
library.newFolder()
Availability
Flash MX 2004.
Usage
library.newFolder([folderPath])
Parameters
folderPath
A string that specifies the name of the folder to be created. If it is specified as a path, and the path doesn’t
exist, the path is created. This parameter is optional.
Returns
A Boolean value:
true
if folder is created successfully;
false
otherwise.
Description
Method; creates a new folder with the specified name, or a default name (
"untitled folder #"
) if no folderName
parameter is provided, in the currently selected folder.
Example
The following example creates two new library folders. The second folder is a subfolder of the first folder:
fl.getDocumentDOM().library.newFolder("first/second");
library.renameItem()
Availability
Flash MX 2004.
Usage
library.renameItem(name)
Parameters
name
A string that specifies a new name for the library item.
Returns
A Boolean value of
true
if the name of the item changes successfully,
false
otherwise. If multiple items are selected,
no names are changed, and the return value is
false
(to match user interface behavior).
Description
Method; renames the currently selected library item in the Library panel.
Example
The following example renames the currently selected library item to
new name
:
fl.getDocumentDOM().library.renameItem("new name");