User Guide

Button._visible 165
Button._visible
Availability
Flash Player 6.
Usage
my_btn._visible:Boolean
Description
Property; a Boolean value that indicates whether the button specified by my_btn is visible.
Buttons that are not visible (
_visible property set to false) are disabled.
Example
Create two buttons on the Stage with the instance names myBtn1_btn and myBtn2_btn. Enter
the following ActionScript in Frame 1 of the Timeline:
myBtn1_btn.onRelease = function() {
this._visible = false;
trace("clicked "+this._name);
};
myBtn2_btn.onRelease = function() {
this._alpha = 0;
trace("clicked "+this._name);
};
Notice how you can still click myBtn2_btn after the alpha is set to 0.
See also
MovieClip._visible, TextField._visible