screen.instanceName

Availability

Flash MX 2004.

Usage

screen.instanceName

Description

Read-only property; a string that represents the instance name used to access the object from ActionScript.

Example

The following example checks to see if the current document allows screens (because it is a slide or form). Then, it assigns the instanceName value of the first child screen in the array to the myInstanceName variable and opens the Output panel to show the instance name of the screen:

var myChildren = new Array();
if(fl.getDocumentDOM().allowScreens) {
    var myInstanceName = fl.getDocumentDOM().screenOutline.rootScreen.childScreens[0].instanceName;
    fl.trace(" The instanceName is "+myInstanceName+". ");
}