User Guide
Form.visible 747
Example
In the following example, a reference to the root form of myForm is placed in a variable named
root. If the value assigned to root refers to myForm, then myForm is at the top of its form tree.
var root:mx.screens.Form = myForm.rootForm;
if(root == myForm) {
trace("myForm is the top form in its tree");
}
Form.visible
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
myForm.visible
Description
Property; determines whether myForm is visible when its parent form, slide, movie clip, or
SWF file is visible. You can also set this property using the Property inspector in the Flash
authoring environment.
When this property is set to
true, myForm receives a reveal event; when set to false,
myForm receives a hide event. You can attach transitions to forms that execute when a form
receives one of these events. For more information on adding transitions to screens, see
“Creating controls and transitions for screens with behaviors (Flash Professional only)” in
Using Flash.
Example
The following code, on a timeline frame, sets the visible property of the form that contains
the button to
false.
btnOk.addEventListener("click", btnOkClick);
function btnOkClick(eventObj:Object):Void {
eventObj.target._parent.visible = false;
}