Slide.indexInParentSlide

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX Professional 2004.

Usage

mySlide.indexInParent

Description

Property (read-only); returns the zero-based index of mySlide in its parent's list of child slides.

Example

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.

See also

Slide.numChildSlides, Slide.revealChild