ActionScript 2.0 Components Language Reference |
|
|
|
| Screen class > Screen.parentIsScreen | |||
Flash Player 6 (6.0.79.0).
Flash MX Professional 2004.
myScreen.parentIsScreen
Property (read-only): returns a Boolean value indicating whether the specified screen's parent object is also a screen (true) or not (false). If this property is false, myScreen is at the root of its screen hierarchy.
The following code determines if the parent object of the screen myScreen is also a screen. If myScreen.parentIsScreen is true, a trace() statement displays the number of sibling slides of myScreen in the Output panel. If the parent screen of myScreen is not also a screen, Flash assumes that myScreen is the root (master) slide in the presentation and therefore has no sibling slides.
if (myScreen.parentIsScreen) {
trace("I have "+myScreen._parent.numChildScreens+" sibling screens");
} else {
trace("I am the root screen and have no siblings");
}
|
|
|
|