Extending Flash |
|
|
|
| Objects > Screen object > screen.instanceName | |||
Flash MX 2004.
screen.instanceName
Read-only property; a string that represents the instance name used to access the object from ActionScript.
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+". ");
}
|
|
|
|