User Guide

Instance object 199
Instance object
Inheritance Element object > Instance object
Availability
Flash MX 2004.
Description
Instance is a subclass of the Element object.
Property summary for the Instance object
In addition to all of the Element object properties, Instance has the following properties:
instance.instanceType
Availability
Flash MX 2004.
Usage
instance.instanceType
Description
Read-only property; a string that represents the type of Instance. Valid values are "symbol",
"bitmap", "embedded video", "linked video", and "compiled clip".
Example
The following example shows that the instance type of a movie clip is "symbol":
//select a movie clip, then run this script
var type = fl.getDocumentDOM().selection[0].instanceType;
fl.trace("This instance type is " + type);
instance.libraryItem
Availability
Flash MX 2004.
Usage
instance.libraryItem
Description
Property; a library item used to instantiate this instance. You can change this property only to
another library item of the same type (that is, you cannot set a
symbol instance to refer to a
bitmap). See library object.
Property Description
instance.instanceType Read-only; a string that represents the type of Instance.
instance.libraryItem Library item used to instantiate this instance.
CHAPTER 3
Objects