Parameters
A string that specifies the name of the data to add.
name
A string that defines the type of data to add. Acceptable values are
type
,
"integer"
"integerArray"
the value to add. Valid types depend on the
data
Returns
Nothing.
Description
Method; stores specified data with a document. Data is written to the FLA file and is available
to JavaScript when the file reopens.
Example
The following example adds an integer value of
fl.getDocumentDOM().addDataToDocument("myData", "integer", 12);
The following example returns the value of the data named
in the Output panel:
fl.trace(fl.getDocumentDOM().getDataFromDocument("myData"));
See also
document.getDataFromDocument()
document.addDataToSelection()
Availability
Flash MX 2004.
Usage
document.addDataToSelection( name, type, data )
Parameters
A string that specifies the name of the persistent data.
name
Defines the type of data. Acceptable values are
type
,
"double"
"doubleArray"
The value to add. Valid types depend on the
data
Returns
Nothing.
70
Objects
,
,
"double"
"doubleArray"
12
,
document.removeDataFromDocument()
,
, and
"string"
"byteArray"
,
, and
"string"
parameter.
type
to the current document:
and displays the result
"myData"
,
"integer"
"integerArray"
.
parameter.
type
are
type
.
"byteArray"
,
Need help?
Do you have a question about the FLASH 8-EXTENDING FLASH and is the answer not in the manual?