User Guide

984 NumericStepper component
NumericStepper.previousValue
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004.
Usage
numericStepperInstance.previousValue
Description
Property (read-only); the previous sequential value. This property can contain a number of up
to three decimal places.
Example
The following example sets the initial value of the NumericStepper instance to equal the
minimum value of 6. It sets the
stepSize value to 3 and creates a listener object for a change
event. When a change event occurs, the example displays the
previousValue property in the
Output panel.
Drag an instance of the NumericStepper component onto the Stage, and enter the instance
name
my_nstep in the Property inspector. Add the following code to Frame 1 of the timeline:
/**
Requires:
- NumericStepper component on Stage (instance name: my_nstep)
*/
var my_nstep:mx.controls.NumericStepper;
my_nstep.minimum = 6;
my_nstep.value = my_nstep.minimum;
my_nstep.maximum = 120;
my_nstep.stepSize = 3;
// Create listener object.
var nstepListener:Object = new Object();
nstepListener.change = function(evt_obj:Object) {
trace("previous value = " + evt_obj.target.previousValue);
}
// Add listener.
my_nstep.addEventListener("change", nstepListener);