User Guide
Screen.indexInParent 1083
Description
Method; returns the child screen of myScreen whose index is childIndex.
Example
The following example sends the names of all the child screens belonging to the root screen
named
Presentation to the Output panel.
for (var i:Number = 0; i < _root.Presentation.numChildScreens; i++) {
var childScreen:mx.screens.Screen =
_root.Presentation.getChildScreen(i);
trace(childScreen._name);
}
Screen.indexInParent
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
myScreen.indexInParent
Description
Property (read-only); contains the zero-based index of myScreen in its parentās list of
child screens.
Example
The following example displays the relative position of the screen myScreen in its parent
screenās list of child screens.
var numChildren:Number = myScreen._parent.numChildScreens;
var myIndex:Number = myScreen.indexInParent;
trace("Iām child slide # " + myIndex + " out of " + numChildren + "
screens.");