Packagekm.components
Classpublic class NumericStepper
InheritanceNumericStepper Inheritance UIComponent Inheritance flash.display.Sprite

The NumericStepper component class.


Example
import km.components.*;
import km.skins.*;

var ns:NumericStepper = new NumericStepper();
ScriptedSkin.applyTo(ns);
ns.move(20, 20);
addChild(ns);

ns.minimum = 0;
ns.maximum = 255;
ns.stepSize = 25.5;
ns.value = 0;
ns.onChange = updateShape;

var s:Shape = new Shape();
s.x = 20;
s.y = 50;
addChild(s);

function updateShape():void {
 s.graphics.clear();
 s.graphics.beginFill(ns.value << 16);
 s.graphics.drawRect(0, 0, 40, 40);
 s.graphics.endFill();
}

updateShape();



Public Properties
 PropertyDefined by
  background : Image
[read-only] >> Reference to the background image.
NumericStepper
  btnDec : BaseButton
[read-only] >> Reference to the decrease button.
NumericStepper
  btnInc : BaseButton
[read-only] >> Reference to the increase button.
NumericStepper
 Inheritedduotone : Array
The duotone property can be used to convert the colors of the component into duotone.
UIComponent
 Inheritedenabled : Boolean
Specifies if the component is enabled.
If a component is disabled, it will be turned into grayscale and become partly transparent.
UIComponent
 Inheritedheight : Number
UIComponent
  label : Label
[read-only] >> Reference to the label.
NumericStepper
  margin : int
The margin between the bounding box of the background and the sub components inside.
NumericStepper
  maximum : Number
Gets or sets the maximum value.
NumericStepper
  minimum : Number
Gets or sets the minimum value.
NumericStepper
  onChange : Function
onChange handler.
NumericStepper
  stepSize : Number
Gets or sets the step size.
NumericStepper
 InheritedtoolTip : String
Text to use as toolTip when ToolTip is enabled.
UIComponent
  value : Number
Gets or sets the current value.
NumericStepper
 Inheritedwidth : Number
UIComponent
 Inheritedx : Number
UIComponent
 Inheritedy : Number
UIComponent
Public Methods
 MethodDefined by
  
NumericStepper
 Inherited
clone():*
Returns a clone of the component.
The skin of the component is cloned but other things like the text of a label or the items of a list aren't.
UIComponent
 Inherited
move(x:int, y:int, animationMode:int = 0, animationFrames:int = 12, easeInOut:Boolean = false):void
Moves the component to the specified coordinates.
UIComponent
 Inherited
setProperties(o:Object):void
Sets a number of properties at once.
UIComponent
 Inherited
setSize(w:int, h:int):void
Sets the size width and height.
UIComponent
Events
 EventSummaryDefined by
 Inherited The animationComplete event is broadcasted when an animated move is completed.UIComponent
   The change event is broadcasted when the value changes.
When the value is changed by scripting, the event is not broadcasted.
It's also possible to use the onChange handler.
NumericStepper
Property detail
backgroundproperty
background:Image  [read-only]

>> Reference to the background image.

Implementation
    public function get background():Image
btnDecproperty 
btnDec:BaseButton  [read-only]

>> Reference to the decrease button.

Implementation
    public function get btnDec():BaseButton
btnIncproperty 
btnInc:BaseButton  [read-only]

>> Reference to the increase button.

Implementation
    public function get btnInc():BaseButton
labelproperty 
label:Label  [read-only]

>> Reference to the label.

Implementation
    public function get label():Label
marginproperty 
public var margin:int

The margin between the bounding box of the background and the sub components inside.

maximumproperty 
maximum:Number  [read-write]

Gets or sets the maximum value.

Implementation
    public function get maximum():Number
    public function set maximum(value:Number):void
minimumproperty 
minimum:Number  [read-write]

Gets or sets the minimum value.

Implementation
    public function get minimum():Number
    public function set minimum(value:Number):void
onChangeproperty 
public var onChange:Function

onChange handler.

stepSizeproperty 
stepSize:Number  [read-write]

Gets or sets the step size.

Implementation
    public function get stepSize():Number
    public function set stepSize(value:Number):void
valueproperty 
value:Number  [read-write]

Gets or sets the current value.

Implementation
    public function get value():Number
    public function set value(value:Number):void
Constructor detail
NumericStepper()constructor
public function NumericStepper()
Event detail
changeevent 
Event object type: flash.events.Event

The change event is broadcasted when the value changes.
When the value is changed by scripting, the event is not broadcasted.
It's also possible to use the onChange handler.