Archived:Numeric Stepper in Flash Lite
We do not recommend Flash Lite development on current Nokia devices, and all Flash Lite articles on this wiki have been archived. Flash Lite has been removed from all Nokia Asha and recent Series 40 devices and has limited support on Symbian. Specific information for Nokia Belle is available in Flash Lite on Nokia Browser for Symbian. Specific information for OLD Series 40 and Symbian devices is available in the Flash Lite Developers Library.
Article Metadata
Code Example
Article
Contents |
Introduction
The numeric stepper is one of the most ubiquitous UI components in modern UI design. The numeric stepper has a textfield(that contains a Numberic value) which can be incremented by fixed steps by the use of buttons. The numeric stepper must also provide for direct editing of the textfield's value.
Prerequisites
This component was developed in Flash Player 8 and ActionScript 2.0. It was tested on Nokia Xpress Music 5800.
Where to use
The numeric stepper is used in use-cases where Numeric value of a closer range is generally opted by the user. This is where the Numeric stepper gains lead over the ordinary textfield, as the user neednot always change the value by typing the desired value.
How to use
Download the source file(FLA) given below. When you wish to use this component in your FLA, import this from the downloaded file, using the FILE->IMPORT->OPEN EXTERNAL LIBRARY option.
Properties
To view the properties of the component go to (Window -> Component Inspector) and select the component in the Stage.
- Initial Value : This is the value that the user must initialise while setting up his component. It is numeric by type.
- Step increment : The unit of increment/decrement of the numeric stepper's value.
Operating Method
Drag and drop the component onto the stage, at the desired location. Modify the properties either using the component inspector or from code. When modifying the code, instantiate the component and code as below.
// ns is the instance name of the component.
ns.step = 2;
ns.initial_value =5;
// to read the value in numeric stepper, use
trace(ns.value.text);
Downloads
Download the source file here.Media:Numeric stepper.zip
Author
--manikantan 16:13, 21 June 2009 (EEST)


23 Sep
2009