ActionScript 2.0 Components Language Reference |
|
|
|
| Slide class > Slide.indexInParentSlide | |||
Flash Player 6 (6.0.79.0).
Flash MX Professional 2004.
mySlide.indexInParent
Property (read-only); returns the zero-based index of mySlide in its parent's list of child slides.
The following code uses the indexInParentSlide and Slide.numChildSlides properties to display the index of the current slide being viewed and the total number of slides contained by its parent slide. To use this code, attach it to a parent slide that contains one or more child slides.
on (revealChild) {
trace("Displaying "+(currentSlide.indexInParentSlide+1)+" of "+currentSlide._parent.numChildSlides);
}
Note that because this property is a zero-based index, its value is incremented by 1 (currentSlide.indexInParent+1) to display more meaningful values.
Slide.numChildSlides, Slide.revealChild
|
|
|
|