Using styles with the NumericStepper

You 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 the skin styles, see About Skins.

To change the appearance of the Numeric Stepper's value:

This procedure uses the textFormat style to change the appearance of the value that the NumericStepper displays.

  1. Create a new Flash file (ActionScript 3.0).
  2. Drag the NumericStepper component from the Component's panel to the Stage and give it an instance name of myNs.
  3. Add the following code to the Actions panel on Frame 1 of the main Timeline.
    var tf:TextFormat = new TextFormat();
    myNs.setSize(100, 50);
    tf.color = 0x0000CC;
    tf.size = 24;
    tf.font = "Arial";
    tf.align = "center";
    myNs.setStyle("textFormat", tf);
    
  4. Select Control > Test Movie.