Main Page | Packages | Class Tree | Index | Help

com.bjc.controls

class NumericStepper

MovieClip
  |
  +--com.bjc.core.BJCComponent
        |
        +--com.bjc.core.LabelWrapper
              |
              +--com.bjc.controls.NumericStepper


class NumericStepper
extends LabelWrapper

A basic numeric stepper for displaying and choosing numeric values

Events:

change - Fired whenever the user changes the value by clicking on the buttons or by typing in the textfield.
focus - Fired whenever the internal text field or component receives focus.
killFocus - Fired whenever the internal text field or component loses focus.
tabFocus - Fired whenever the component receives focus by pressing the TAB key.


Author:
Flashloaded - www.flashloaded.com


Field Summary

public
addEventListener: Function
See the EventDispatcher Class in Flash Help

public
changeHandler: Function
Can be used to assign a direct event handler to the component instance.

public
focusHandler: Function
Can be used to assign a direct event handler to the component instance.

public
killFocusHandler: Function
Can be used to assign a direct event handler to the component instance.

public
removeEventListener: Function
See the EventDispatcher Class in Flash Help

public
tabFocusHandler: Function
Can be used to assign a direct event handler to the component instance.

Fields inherited from class com.bjc.core.BJCComponent

version

Property Summary

public
decimals: Number (write)
Sets the minimum amount of decimals used to display the value. If set to 0, the this property is disabled, and the decimals will appear as needed.

public
decimals: Number (read)
Gets the amount of decimals used to display the value.

public
maximum: Number (write)
Sets the maximum possible value on the component.

public
maximum: Number (read)
Gets the maximum possible value on the component.

public
minimum: Number (write)
Sets the minimum possible value on the component.

public
minimum: Number (read)
Gets the minimum possible value on the component.

public
speed: Number (write)
Sets the value interval (ms) when user holds down a button.

public
speed: Number (read)
Gets the value interval (ms).

public
stepSize: Number (write)
Sets the step size of the component.

public
stepSize: Number (read)
Gets the step size of the component.

public
value: Number (write)
Sets the value of the numeric stepper.

public
value: Number (read)
Gets the value of the numeric stepper.

Properties inherited from class com.bjc.core.LabelWrapper

align, disabledColor, disableStyles, embedFont, fontColor, fontFace, fontSize, html

Properties inherited from class com.bjc.core.BJCComponent

disabledAlpha, enabled, focusTime, height, keyEnabled, style, width

Constructor

public
NumericStepper ( Void)


Method Summary

public static
create ( target: MovieClip, id: String, depth: Number, initObj: Object ): NumericStepper
Static method used to create an instance of a NumericStepper on stage at run time.

Methods inherited from class com.bjc.core.BJCComponent

draw, invalidate, move, remove, setSize



Field Documentation

addEventListener

public var addEventListener: Function
See the EventDispatcher Class in Flash Help

changeHandler

public var changeHandler: Function
Can be used to assign a direct event handler to the component instance.

Usage:
myNumericStepper.changeHandler = function(){
trace("I was changed.");
}

focusHandler

public var focusHandler: Function
Can be used to assign a direct event handler to the component instance.

Usage:
myNumericStepper.focusHandler = function(){
trace("Set focus.");
}

killFocusHandler

public var killFocusHandler: Function
Can be used to assign a direct event handler to the component instance.

Usage:
myNumericStepper.killFocusHandler = function(){
trace("Kill focus.");
}

removeEventListener

public var removeEventListener: Function
See the EventDispatcher Class in Flash Help

tabFocusHandler

public var tabFocusHandler: Function
Can be used to assign a direct event handler to the component instance.

Usage:
myNumericStepper.tabFocusHandler = function(){
trace("Tab focus.");
}


Property Documentation

decimals

public decimals: Number (write)
Sets the minimum amount of decimals used to display the value. If set to 0, the this property is disabled, and the decimals will appear as needed.

Example:
myNumericStepper.decimals = 3;

decimals

public decimals: Number (read)
Gets the amount of decimals used to display the value.

Example:
myVar = myNumericStepper.decimals;

maximum

public maximum: Number (write)
Sets the maximum possible value on the component.

Example:
myNumericStepper.maximum = 100;

maximum

public maximum: Number (read)
Gets the maximum possible value on the component.

Example:
myVar = myNumericStepper.maximum;

minimum

public minimum: Number (write)
Sets the minimum possible value on the component.

Example:
myNumericStepper.minimum = 0;

minimum

public minimum: Number (read)
Gets the minimum possible value on the component.

Example:
myVar = myNumericStepper.minimum;

speed

public speed: Number (write)
Sets the value interval (ms) when user holds down a button.

Example:
myNumericStepper.speed = 200;

speed

public speed: Number (read)
Gets the value interval (ms).

Example:
myVar = myNumericStepper.speed;

stepSize

public stepSize: Number (write)
Sets the step size of the component.

Example:
myNumericStepper.stepSize = 10;

stepSize

public stepSize: Number (read)
Gets the step size of the component.

Example:
myVar = myNumericStepper.stepSize;

value

public value: Number (write)
Sets the value of the numeric stepper.

Example:
myNumericStepper.value = 50;

value

public value: Number (read)
Gets the value of the numeric stepper.

Example:
myVar = myNumericStepper.value;


Constructor Documentation

NumericStepper

public function NumericStepper(Void)

Method Documentation

create

public static function create(target: MovieClip,
 id: String,
 depth: Number,
 initObj: Object): NumericStepper
Static method used to create an instance of a NumericStepper on stage at run time.

Parameters:
target
the movie clip to which the NumericStepper will be attached.
id
the instance name given to the new NumericStepper attached.
depth
the depth at which to attach the new NumericStepper.
initObj
(optional) an object containing any properties you want to assign to the component when it is created
Returns:
a reference to the new NumericStepper attached.

Example:
import com.bjc.controls.NumericStepper;
var newNumericStepper:NumericStepper = NumericStepper.create(_root, "myNumericStepper", 0);


The documentation was generated from the following file:


Copyright Flashloaded - www.flashloaded.com