User Guide
Form.parentIsForm 745
Description
Property (read-only); the number of child forms contained by myForm that are derived directly
from the class mx.screens.Form. This property does not include any slides that are contained
by
myForm; it contains only forms.
Example
The following code iterates over all the child forms contained in myForm and displays their
names in the Output panel.
var howManyKids:Number = myForm.numChildForms;
for(i=0; i<howManyKids; i++) {
var childForm = myForm.getChildForm(i);
trace(childForm._name);
}
See also
Form.getChildForm()
Form.parentIsForm
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
myForm.parentIsForm
Description
Property (read-only): returns a Boolean value indicating whether the specified form’s parent
object is also a form (
true) or not (false). If this property is false, myForm is at the root of
its form hierarchy.
Example
if (myForm.parentIsForm) {
trace("I have "+myForm._parent.numChildScreens+" sibling screens");
} else {
trace("I am the root form and have no siblings");
}
NOTE
When using a custom ActionScript 2.0 class that extends mx.screens.Form, the form
isn't counted in the
numChildForms property.