ActionScript 2.0 Components Language Reference |
|
|
|
| Slide class > Slide.parentIsSlide | |||
Flash Player 6 (6.0.79.0).
Flash MX Professional 2004.
mySlide.parentIsSlide
Property (read-only); a Boolean value indicating whether the parent object of mySlide is also a slide. If the parent object of mySlide is a slide, or belongs to a subclass of Slide, this property returns true; otherwise, it returns false.
If mySlide is the root slide in a presentation, this property returns false, because the presentation slide's parent is the main (_level0), not a slide. This property also returns false if a form is the parent of mySlide.
The following code determines whether the parent object of the slide mySlide is itself a slide. If mySlide.parentIsSlide is true, the number of mySlide's sibling slides is displayed in the Output panel. If the parent object is not a slide, Flash assumes that mySlide is the root (master) slide in the presentation and therefore has no sibling slides.
if (mySlide.parentIsSlide) {
trace("I have " + mySlide._parent.numChildSlides+" sibling slides");
} else {
trace("I am the root slide and have no siblings");
}
|
|
|
|