Document.additem() - 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

Parameters
A string that specifies the name of the persistent data.
name
Defines the type of data. The valid values for
type
,
"double"
"doubleArray"
the value to add. Valid types depend on the
data
Returns
Nothing.
Description
Method; stores specified data with the selected object(s). Data is written to the FLA file and is
available to JavaScript when the file reopens. Only symbols and bitmaps support persistent data.
See
document.removeDataFromSelection()
Example
The following example adds an integer value of 12 to the selected object:
fl.getDocumentDOM().addDataToSelection("myData", "integer", 12);

document.addItem()

Availability
Flash MX 2004.
Usage
document.addItem( position
Parameters
A point that specifies the x and y coordinates of the location at which to add the
position
item. It uses the center of a symbol or the upper left corner of a bitmap or video.
An
Item object
item
Returns
A Boolean value:
Description
Method; adds an item from any open document or library to the specified Document object.
Example
The following example adds the first item from the library to the first document at the specified
location for the selected symbol, bitmap, or video:
var item = fl.documents[0].library.items[0];
fl.documents[0].addItem({x:0,y:0}, item);
66
Chapter 3: Objects
,
, and
"string"
,
item )
that specifies the item to add and the library from which to add it.
if successful;
true
false
are:
type
"integer"
.
"byteArray"
parameter.
type
.
otherwise.
,
,
"integerArray"

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