|
Flash CS4 Resources |
Customize the NumericStepper componentYou can transform a NumericStepper component horizontally and vertically while authoring and at run time. While authoring, select the component on the Stage and use the Free Transform tool or any of the Modify > Transform commands. At run time, use the setSize() method or any applicable properties and methods of the NumericStepper class such as width, height, scaleX, and scaleY. Resizing the NumericStepper component does not change the width of the down and up arrow buttons. If the stepper is resized to be greater than the default height, the default behavior pins the arrow buttons to the top and bottom of the component. Otherwise, 9-slice scaling determines how the buttons are drawn. The arrow buttons always appear to the right of the text box. Styles and the NumericStepper componentYou can set the style properties of the NumericStepper component to change its appearance. The styles specify values for the component’s skins, padding, and text format when the component is drawn. The textFormat style allows you to change the size and appearance of the NumericStepper’s value. The various skin styles allow you to specify different classes to use for the skin. For more information on using skin styles, see About Skins. This procedure uses the textFormat style to change the appearance of the value that the NumericStepper displays.
Skins and the NumericStepper componentThe NumericStepper component has skins to represent the up, down, disabled, and selected states of its buttons. If a stepper is enabled, the down and up buttons display their over states when the pointer moves over them. The buttons display their down state when pressed. The buttons return to their over state when the mouse is released. If the pointer moves off the buttons while the mouse is pressed, the buttons return to their original state. If a stepper is disabled, it displays its disabled state, regardless of user interaction. A NumericStepper component has the following skins:
|