NumericStepper component
The NumericStepper component allows a user to step through an ordered set of numbers. The
component consists of a number in a text box displayed beside small up and down arrow buttons.
When a user presses the buttons, the number is raised or lowered incrementally according to the
unit specified in the
maximum or minimum value is reached. The text in the NumericStepper component's text box is
also editable.
The NumericStepper component handles only numeric data. Also, you must resize the stepper
while authoring to display more than two numeric places (for example, the numbers 5246 or
1.34).
A stepper can be enabled or disabled in an application. In the disabled state, a stepper doesn't
receive mouse or keyboard input. An enabled stepper receives focus if you click it or tab to it and
its internal focus is set to the text box. When a NumericStepper instance has focus, you can use
the following keys control it:
Key
Down Arrow
Left Arrow
Right Arrow
Shift+Tab
Tab
Up Arrow
For more information about controlling focus, see
on page 50
or
"FocusManager class" on page
A live preview of each stepper instance reflects the setting of the value parameter in the Property
inspector or Component inspector during authoring. However, there is no mouse or keyboard
interaction with the stepper's arrow buttons in the live preview.
When you add the NumericStepper 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.NumericStepperAccImpl.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 NumericStepper component
You can use the NumericStepper anywhere you want a user to select a numeric value. For
example, you could use a NumericStepper component in a form to allow a user to set a credit card
expiration date. You could also use a NumericStepper component to allow a user to increase or
decrease a font size.
588
Chapter 6: Components Dictionary
parameter, until the user releases the buttons or until the
stepSize
Description
Value changes by one unit.
Moves the insertion point to the left within the text box.
Moves the insertion point to the right within the text box.
Moves focus to the previous object.
Moves focus to the next object.
Value changes by one unit.
Components Dictionary
"Creating custom focus navigation"
419.
CHAPTER 6
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?