Library.additemtodocument() - 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

Method
library.selectAll()
library.selectItem()
library.selectNone()
library.setItemProperty()
library.updateItem()
Property summary for the library object
The following property is available for the library object.
Property
library.items

library.addItemToDocument()

Availability
Flash MX 2004.
Usage
library.addItemToDocument( position [, namePath] )
Parameters
A point that specifies the x,y position of the center of the item on the Stage.
position
A string that specifies the name of the item. If the item is in a folder, you can specify
namePath
its name and path using slash notation. If
is used. This parameter is optional.
Returns
A Boolean value:
Description
Method; adds the current or specified item to the Stage at the specified position.
Example
The following example adds the currently selected item to the Stage at the (3, 60) position:
fl.getDocumentDOM.library.addItemToDocument({x:3, y:60});
The following example adds the item Symbol1 located in folder1 of the library to the Stage at the
(550, 485) position:
fl.getDocumentDOM().library.addItemToDocument({x:550.0, y:485.0}, "folder1/
Symbol1");
214
Chapter 3: Objects
Description
Method; selects or deselects all items in the library.
Method; selects a specified library item.
Method; deselects all the library items.
Method; sets the property for all selected library items (ignoring
folders).
Method; updates the specified item.
Description
Property; an array of item objects in the library
if the item is successfully added to the document;
true
is not specified, the current library selection
namePath
otherwise.
false

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?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents