Extending Flash |
|
|
|
| Objects > Screen object > screen.parentScreen | |||
Flash MX 2004.
screen.parentScreen
Read-only property; an object that represents the parent screen. If parentScreen is null, the screen is a top-level screen.
The following example stores the values for the childScreens and parentScreen properties in variables and then shows those values and their parent/child relationship in the Output panel:
if(fl.getDocumentDOM().allowScreens) {
var myCurrent = fl.getDocumentDOM().screenOutline.rootScreen.childScreens[1].name;
var myParent = fl.getDocumentDOM().screenOutline.rootScreen.childScreens[1].parentScreen.name;
fl.trace(" The parent screen to "+myCurrent+" is "+myParent+". ");
}
|
|
|
|