Packagecom.gestureworks.cml.element
Classpublic class Stepper
InheritanceStepper Inheritance ElementFactory Inheritance flash.display.Sprite

The Stepper element provides a graphical user interface tool to increment and decrement numbers.
     
        // float stepper
        var st:Stepper = new Stepper();
        
        // change the stepper from float to integer, text color, text value
        st.textColor = 0x0000FF;
        st.text = 0.1;
        st.float = true;
        st.x = 600;
        st.y = 300;
                
        // background graphics
        st.backgroundLineColor = 0x000000;
        st.backgroundLineStroke = 2;
        st.backgroundColor = 0xCCCCCC;
        
        // triangles graphics
        st.topTriangleColor = 0x000000;
        st.topTriangleAlpha = 2;
        st.bottomTriangleColor = 0x000000;
        st.bottomTriangleAlpha = 2;
        
        // text
        var text:Text = new Text();
        text.x = 600;
        text.y = 260;
        text.text = "Stepper-Float";
        text.width = 2000;
        text.color = 0x00FF00;
        text.selectable = false;
        text.font = "OpenSansBold";
        addChild(text);
        
        st.init();
        addChild(st);
        
        
        // integer stepper
        var st1:Stepper = new Stepper();
        
        // change the stepper from integer to float, text color, text value
        st1.textColor = 0x0000FF;
        st1.text = 1;
        st1.float = false;
        st1.x = 1000;
        st1.y = 300;
        
        // background graphics
        st1.backgroundLineColor = 0x000000;
        st1.backgroundLineStroke = 2;
        st1.backgroundColor = 0xCCCCCC;
        
        // triangles graphics
        st1.topTriangleColor = 0x000000;
        st1.topTriangleAlpha = 2;
        st1.bottomTriangleColor = 0x000000;
        st1.bottomTriangleAlpha = 2;

        // text
        var text1:Text = new Text();
        text1.x = 1000;
        text1.y = 260;
        text1.text = "Stepper-Integer";
        text1.multiline = true;
        text1.wordWrap = true;
        text1.width = 2000;
        text1.color = 0x00FF00;
        text1.selectable = false;
        text1.font = "OpenSansBold";
        addChild(text1);
        
        st1.init();
        addChild(st1);     
    
     
     

See also

Slider


Public Properties
 PropertyDefined By
 Inheritedalpha : Number
[override] [write-only] sets the alpha for display objects
ElementFactory
  background : Sprite
Defines the background which is a rectangle
Stepper
  backgroundColor : uint
Sets the color of background
Stepper
  backgroundLineColor : uint
Sets the background line color
Stepper
  backgroundLineStroke : Number
Sets the line stroke of background
Stepper
 Inheritedblur : Boolean
Sets the drop shadow effect
ElementFactory
 Inheritedbottom : Number
sets the bottom value
ElementFactory
  bottomSquare : TouchSprite
Defines the bottom square of background
Stepper
  bottomTriangle : TouchSprite
Defines the bottom triangle of square
Stepper
  bottomTriangleAlpha : Number
Sets the bottom triangle alpha of background
Stepper
  bottomTriangleColor : uint
Sets the bottom triangle color of background
Stepper
 Inheritedclass_ : String
Object's css class;
ElementFactory
 InheritedclassName : String
sets the class name of displayobject
ElementFactory
 InheritedcmlIndex : int
sets the cml index
ElementFactory
 InheriteddebugStyle : *
sets the debug style
ElementFactory
 InheriteddisplayEvents : String
Use for dispatch completes.
ElementFactory
 InheriteddropShadow : Boolean
Sets the drop shadow effect
ElementFactory
  float : Boolean
Sets the boolean flag for decimal or integers.
Stepper
 Inheritedheight : Number
[override] Sets width of the display object in pixels
ElementFactory
 InheritedheightPercent : String
sets the height percent of display object
ElementFactory
 InheritedhorizontalCenter : Number
sets the horizontal center of display object
ElementFactory
 Inheritedid : String
sets the id of child
ElementFactory
 Inheritedindex : int
sets the index of display object
ElementFactory
  inputTxt : Text
Defines the input text Field
Stepper
 Inheritedleft : Number
sets left value
ElementFactory
 InheritedpropertyStates : Array
Deprecated: Please Use state
ElementFactory
 Inheritedright : Number
sets the right value
ElementFactory
 Inheritedscale : Number
Sets both the x and y scale values
ElementFactory
 InheritedscaleX : Number
[override] Sets width of the display object in pixels
ElementFactory
 InheritedscaleY : Number
[override] Sets width of the display object in pixels
ElementFactory
 Inheritedstate : Array
property states array
ElementFactory
  text : Number
Sets the default Number in Text Field
Stepper
  textColor : Number
Sets the text color
Stepper
 Inheritedtop : Number
sets top value
ElementFactory
  topSquare : TouchSprite
Defines the top square of background
Stepper
  topTriangle : TouchSprite
Defines the top triangle of square
Stepper
  topTriangleAlpha : Number
Sets the top triangle alpha of background
Stepper
  topTriangleColor : uint
Sets the top triangle color of background
Stepper
  txt : Text
Defines the text Field
Stepper
 InheritedverticalCenter : Number
sets the vertical center of display object
ElementFactory
 Inheritedwidth : Number
[override] Sets width of the display object in pixels
ElementFactory
 InheritedwidthPercent : String
sets the percent of width of display object
ElementFactory
Public Methods
 MethodDefined By
  
Constructor
Stepper
 Inherited
clone():*
Returns clone of self
ElementFactory
  
[override] CML display initialization callback
Stepper
  
dispose():void
[override] Dispose methods
Stepper
  
init():void
[override] Initializes the configuration and display of Numbers
Stepper
 Inherited
parseCML(cml:XMLList):XMLList
parses cml file
ElementFactory
 Inherited
postparseCML(cml:XMLList):void
post parses the cml file
ElementFactory
 Inherited
updateProperties(state:Number = 0):void
this method updates the properties
ElementFactory
Property Detail
backgroundproperty
public var background:Sprite

Defines the background which is a rectangle

backgroundColorproperty 
backgroundColor:uint

Sets the color of background

The default value is 0xCCCCCC.


Implementation
    public function get backgroundColor():uint
    public function set backgroundColor(value:uint):void
backgroundLineColorproperty 
backgroundLineColor:uint

Sets the background line color

The default value is 0x000000.


Implementation
    public function get backgroundLineColor():uint
    public function set backgroundLineColor(value:uint):void
backgroundLineStrokeproperty 
backgroundLineStroke:Number

Sets the line stroke of background

The default value is 3.


Implementation
    public function get backgroundLineStroke():Number
    public function set backgroundLineStroke(value:Number):void
bottomSquareproperty 
public var bottomSquare:TouchSprite

Defines the bottom square of background

bottomTriangleproperty 
public var bottomTriangle:TouchSprite

Defines the bottom triangle of square

bottomTriangleAlphaproperty 
bottomTriangleAlpha:Number

Sets the bottom triangle alpha of background

The default value is 1.


Implementation
    public function get bottomTriangleAlpha():Number
    public function set bottomTriangleAlpha(value:Number):void
bottomTriangleColorproperty 
bottomTriangleColor:uint

Sets the bottom triangle color of background

The default value is 0x000000.


Implementation
    public function get bottomTriangleColor():uint
    public function set bottomTriangleColor(value:uint):void
floatproperty 
float:Boolean

Sets the boolean flag for decimal or integers.


Implementation
    public function get float():Boolean
    public function set float(value:Boolean):void
inputTxtproperty 
public var inputTxt:Text

Defines the input text Field

textproperty 
text:Number

Sets the default Number in Text Field

The default value is = 0;.


Implementation
    public function get text():Number
    public function set text(value:Number):void
textColorproperty 
textColor:Number

Sets the text color

The default value is 0x0000FF.


Implementation
    public function get textColor():Number
    public function set textColor(value:Number):void
topSquareproperty 
public var topSquare:TouchSprite

Defines the top square of background

topTriangleproperty 
public var topTriangle:TouchSprite

Defines the top triangle of square

topTriangleAlphaproperty 
topTriangleAlpha:Number

Sets the top triangle alpha of background

The default value is 1.


Implementation
    public function get topTriangleAlpha():Number
    public function set topTriangleAlpha(value:Number):void
topTriangleColorproperty 
topTriangleColor:uint

Sets the top triangle color of background

The default value is 0x000000.


Implementation
    public function get topTriangleColor():uint
    public function set topTriangleColor(value:uint):void
txtproperty 
public var txt:Text

Defines the text Field

Constructor Detail
Stepper()Constructor
public function Stepper()

Constructor

Method Detail
displayComplete()method
override public function displayComplete():void

CML display initialization callback

dispose()method 
override public function dispose():void

Dispose methods

init()method 
override public function init():void

Initializes the configuration and display of Numbers