Flash CS3 Documentation |
|||
| ActionScript 2.0 Components Language Reference > RadioButton component | |||
The RadioButton component lets you force a user to make a single choice within a set of choices. This component must be used in a group of at least two RadioButton instances. Only one member of the group can be selected at any given time. Selecting one radio button in a group deselects the currently selected radio button in the group. You set the groupName parameter to indicate which group a radio button belongs to.
|
NOTE |
|
A RadioButton component is supported for both ActionScript 2.0 and ActionScript 3.0. This document discusses the version 2 component. If you are using the version 3 component, see Using the RadioButton in Using ActionScript 3.0 Components. |
A radio button can be enabled or disabled. A disabled radio button doesn't receive mouse or keyboard input. When the user clicks or tabs into a RadioButton component group, only the selected radio button receives focus. The user can then use the following keys control it:
|
Key |
Description |
|---|---|
|
Up Arrow/Left Arrow |
The selection moves to the previous radio button within the radio button group. |
|
Down Arrow/Right Arrow |
The selection moves to the next radio button within the radio button group. |
|
Tab |
Moves focus from the radio button group to the next component. |
For more information about controlling focus, see FocusManager class or Creating custom focus navigation in Using ActionScript 2.0 Components.
A live preview of each RadioButton instance on the Stage reflects changes made to parameters in the Property inspector or Component inspector during authoring. However, the mutual exclusion of selection does not display in the live preview. If you set the selected parameter to true for two radio buttons in the same group, they both appear selected even though only the last instance created appears selected at runtime. For more information, see RadioButton parameters.
When you add the RadioButton component to an application, you can use the Accessibility panel to make it accessible to screen readers. First, you must add the following line of code to enable accessibility:
mx.accessibility.RadioButtonAccImpl.enableAccessibility();
You enable accessibility for a component only once, regardless of how many instances you have of the component. For more information, see "Creating accessible content" in Using Flash.
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/00003378.html