Item object
203
Example
The following example gets the value of the data named myData from the first item in the library
and stores it in the variable
libData
.
var libData = fl.getDocumentDOM().library.items[0].getData( "myData" );
item.hasData()
Availability
Flash MX 2004.
Usage
item.hasData(
name
)
Parameters
name
A string that specifies the name of the data to check for in the library item.
Returns
A Boolean value:
true
if the specified data exists;
false
otherwise.
Description
Method; determines whether the library item has the named data.
Example
The following example shows a message in the Output panel if the first item in the library
contains data point named myData:
if ( fl.getDocumentDOM().library.items[0].hasData( "myData" ) ){
fl.trace("Yep, it's there!");
}
item.itemType
Availability
Flash MX 2004.
Usage
item.itemType
Description
Read-only property; a string that specifies the type of element. Potential values are
"undefined"
,
"component"
,
"movie clip"
,
"graphic"
,
"button"
,
"video"
,
"folder"
,
"font"
,
"sound"
,
"bitmap"
,
"compiled clip"
, and
"video"
.
Example
The following example shows the type of the specified library item in the Output panel:
fl.trace(fl.getDocumentDOM().library.items[0].itemType);
Содержание FLASH MX 2004-FLASH JAVASCRIPT DICTIONARY
Страница 1: ...Flash JavaScript Dictionary ...
Страница 16: ...16 Contents ...
Страница 40: ...40 Chapter 2 Top level functions ...
Страница 368: ...368 Chapter 3 Objects ...
Страница 386: ...386 Chapter 4 C Level Extensibility ...