Item.hasdata(); Item.itemtype - 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

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
var libData = fl.getDocumentDOM().library.items[0].getData( "myData" );

item.hasData()

Availability
Flash MX 2004.
Usage
item.hasData( name )
Parameters
A string that specifies the name of the data to check for in the library item.
name
Returns
A Boolean value:
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
,
"component"
"movie clip"
,
"bitmap"
"compiled clip"
Example
The following example shows the type of the specified library item in the Output panel:
fl.trace(fl.getDocumentDOM().library.items[0].itemType);
.
libData
if the specified data exists;
true
,
"graphic"
, and
"video"
otherwise.
false
,
,
,
"button"
"video"
.
"undefined"
,
,
"folder"
"font"
"sound"
Item object
,
,
203

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