_visible (Button._visible property)

public _visible : Boolean

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.

Availability: ActionScript 1.0; Flash Player 6

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

_visible (MovieClip._visible property), _visible (TextField._visible property)


Flash CS3


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00001470.html