Library.addnewitem(); Library.deleteitem() - MACROMEDIA FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY Manual

Flash javascript dictionary
Hide thumbs Also See for FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY:
Table of Contents

Advertisement

library.addNewItem()

Availability
Flash MX 2004.
Usage
library.addNewItem( type [, namePath] )
Parameters
A string that specifies the type of item to create. The only acceptable values for
type
,
"video"
"movie clip"
cannot add a sound to the library with this method). Specifying a folder path is the same as using
library.newFolder()
A string that specifies the name of the item to be added. If the item is in a folder,
namePath
specify its name and path using slash notation. This parameter is optional.
Returns
A Boolean value:
Description
Method; creates a new item of the specified type in the Library panel and sets the new item to the
currently selected item.
Example
The following example creates a new button item named start in a new folder named folderTwo:
fl.getDocumentDOM().library.addNewItem("button", "folderTwo/start");

library.deleteItem()

Availability
Flash MX 2004.
Usage
library.deleteItem( [ namePath ] )
Parameters
A string that specifies the name of the item to be deleted. If the item is in a folder,
namePath
you can specify its name and path using slash notation. If you pass a folder name, the folder and
all its items are deleted. If no name is specified, Flash deletes the currently selected item or items.
To delete all the items in the Library panel, select all items before using this method. This
parameter is optional.
Returns
A Boolean value:
,
,
"button"
"graphic"
before calling this method.
if the item is successfully created;
true
if the items are successfully deleted;
true
,
, and
"bitmap"
"folder"
otherwise.
false
otherwise.
false
are
type
(so, for example, you
library object
215

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY and is the answer not in the manual?

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents