User interaction with the RadioButton

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 to 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 the IFocusManager interface and the FocusManager class in the ActionScript 3.0 Language and Components Reference and Working with FocusManager.

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 run time. For more information, see RadioButton parameters.

When you add the RadioButton component to an application, you can make it accessible to a screen reader by adding the following lines of code:

import fl.accessibility.RadioButtonAccImpl;
RadioButtonAccImpl.enableAccessibility();

You enable accessibility for a component only once, regardless of how many instances you have of the component. For more information, see Chapter 18, "Creating Accessible Content," in Using Flash.