CheckBox component
A check box is a square box that can be selected or deselected. When it is selected, a check mark
appears in the box. You can add a text label to a check box and place it to the left, right, top,
or bottom.
A check box can be enabled or disabled in an application. If a check box is enabled and a user
clicks it or its label, the check box receives input focus and displays its pressed appearance. If a
user moves the pointer outside the bounding area of a check box or its label while pressing the
mouse button, the component's appearance returns to its original state and it retains input focus.
The state of a check box does not change until the mouse is released over the component.
Additionally, the check box has two disabled states, selected and deselected, which do not allow
mouse or keyboard interaction.
If a check box is disabled, it displays its disabled appearance, regardless of user interaction. In the
disabled state, a button doesn't receive mouse or keyboard input.
A CheckBox instance receives focus if a user clicks it or tabs to it. When a CheckBox instance has
focus, you can use the following keys to control it:
Key
Shift+Tab
Spacebar
Tab
For more information about controlling focus, see
on page 50
or
"FocusManager class" on page
A live preview of each CheckBox instance reflects changes made to parameters in the Property
inspector or Component inspector during authoring.
When you add the CheckBox 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.CheckBoxAccImpl.enableAccessibility();
You enable accessibility for a component only once, regardless of how many instances you have of
the component. For more information, see Chapter 17, "Creating Accessible Content," in Using
Flash.
Using the CheckBox component
A check box is a fundamental part of any form or web application. You can use check boxes
wherever you need to gather a set of
example, a form collecting personal information about a customer could have a list of hobbies for
the customer to select; each hobby would have a check box beside it.
Description
Moves focus to the previous element.
Selects or deselects the component and triggers the
Moves focus to the next element.
419.
or
true
false
Components Dictionary
"Creating custom focus navigation"
values that aren't mutually exclusive. For
CheckBox component
CHAPTER 6
event.
click
157
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?
Questions and answers