MACROMEDIA FLASH 8-EXTENDING FLASH Manual page 195

Extending flash
Table of Contents

Advertisement

element.elementType
Availability
Flash MX 2004.
Usage
element.elementType
Description
Read-only property; a string that represents the type of the specified element. The value is one
of the following:
"shape"
with an extensible tool.
Example
The following example stores the type of the first element in the
// In a new file, place a movie clip on first frame top layer, and
// then run this line of script.
var eType =
fl.getDocumentDOM().getTimeline().layers[0].frames[0].elements[0].elemen
tType; // eType = instance
The following example displays several properties for all the elements in the current layer
or frame:
var tl = fl.getDocumentDOM().getTimeline()
var elts = tl.layers[tl.currentLayer].frames[tl.currentFrame].elements;
for (var x = 0; x < elts.length; x++) {
var elt = elts[x];
fl.trace("Element "+ x +" Name = " + elt.name + " Type = " +
elt.elementType + " location = " + elt.left + "," + elt.top + " Depth = "
+ elt.depth);
}
element.getPersistentData()
Availability
Flash MX 2004.
Usage
element.getPersistentData( name )
Parameters
A string that identifies the data to be returned.
name
,
,
"text"
"instance"
, or
. A
"shapeObj"
"shapeObj"
eType
is created
variable:
Element object
195

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-EXTENDING FLASH and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Flash 8

Table of Contents