User Guide
NumericStepper component 597
Example
This example, written on a frame of the Timeline, sends a message to the Output panel when a
stepper called
myNumericStepper is changed. The first line of code creates a listener object called
form. The second line defines a function for the change event on the listener object. Inside the
function is a
trace() statement that uses the event object that is automatically passed to the
function, in this example
eventObj, to generate a message. The target property of an event
object is the component that generated the event—in this example,
myNumericStepper. The
NumericStepper.value property is accessed from the event object’s target property. The last
line calls
EventDispatcher.addEventListener() from myNumericStepper and passes it the
change event and the form listener object as parameters.
form = new Object();
form.change = function(eventObj){
// eventObj.target is the component that generated the change event,
// i.e., the numeric stepper.
trace("Value changed to " + eventObj.target.value);
}
myNumericStepper.addEventListener("change", form);
NumericStepper.maximum
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004.
Usage
stepperInstance.maximum
Description
Property; the maximum range value of the stepper. This property can contain a number of up to
three decimal places. The default value is 10.
Example
The following example sets the maximum value of the stepper range to 20:
myStepper.maximum = 20;
See also
NumericStepper.minimum
NumericStepper.minimum
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004.