![]() ![]() | |
Flash Player 6.0.79.
Flash MX 2004.
buttonInstance.selected
Property; a Boolean value specifying whether a button is pressed (true) or not (false). The value of the toggle property must be true to set the selected property to true. If the toggle property is false, assigning a value of true to the selected property has no effect. The default value is false.
The click event is not triggered when the value of the selected property changes with ActionScript. It is triggered when a user interacts with the button.
In the following example, the toggle property is set to true and the selected property is set to true which puts the button in a pressed state. The trace action sends the value true to the Output panel:
ButtonInstance.toggle = true; // toggle needs to be true in order to set the selected property ButtonInstance.selected = true; //displays the toggled state of the button trace(ButtonInstance.selected); //traces- true
![]() ![]() | |