Developer Network Home  Help 

YDN Flash Developer Center Astra Flex Components TimeStepper
Flash Developer Center

ASTRA TimeStepper

TimeStepper is a user interface component for Flex that allows the user to input a time value. This control include fields for hours, minutes, seconds, and AM/PM. Styling options allow the time to be presented in 12- or 24-hour formats. Up and down buttons allow the user to increase or decrease the currently selected field.

Getting Started: TimeStepper for Flex 3

Similar to other Flex components, you can create a TimeStepper by creating an instance with MXML or by using ActionScript to create an instance dynamically.

Initializing an TimeStepper with MXML

Similar to other Flex components, you can create an TimeStepper with MXML. First, you must import the yahoo namespace for the Astra Flex controls. Simply add xmlns:yahoo="http://www.yahoo.com/astra/2006/mxml" to your application or MXML component declaration.

To programmatically set the text of the TimeStepper control, use the value property. It accepts a standard ActionScript Date object.

Screen capture of TimeStepper MXML Example

To see a live example, please install Adobe Flash Player version 9 or higher.

Download the MXML example file.

Initializing an TimeStepper with ActionScript

Alternatively, you can use ActionScript to instantiate an TimeStepper control. Be sure the import the TimeStepper class first, then simply create an instance and add it to the display list using addChild().

Like in MXML, you can set the value property using a Date object.

Screen capture of TimeStepper ActionScript Example

To see a live example, please install Adobe Flash Player version 9 or higher.

Download the MXML example file.

For additional topics, please read Using TimeStepper, or take a look at the Examples section for functional demonstrations. The ActionScript 3.0 Class Reference contains full details on every property, method, and style available to the TimeStepper component.