User Guide

Form.getChildForm() 743
Description
Property (read-only); returns the Form object that contains the global current focus. The
actual focus may be on the form itself, or on a movie clip, text object, or component inside
that form. May be
null if there is no current focus.
Example
The following code, attached to a button (not shown), displays the name of the form with the
current focus.
trace("The form with the current focus is: " +
mx.screens.Form.currentFocusedForm);
Form.getChildForm()
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
myForm.getChildForm(childIndex)
Parameters
childIndex A number that indicates the zero-based index of the child form to return.
Returns
A Form object.
Description
Method; returns the child form of myForm whose index is childIndex.
Example
The following example is displayed in the Output panel the names of all the child Form
objects belonging to the root Form object named
application.
for (var i:Number = 0; i < _root.application.numChildForms; i++) {
var childForm:mx.screens.Form = _root.application.getChildForm(i);
trace(childForm._name);
}
See also
Form.numChildForms