Packagecom.gestureworks.cml.elements
Classpublic class Stepper
InheritanceStepper Inheritance TouchContainer Inheritance com.gestureworks.core.TouchSprite

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
 InheritedautoShuffle : Boolean
autoshuffles
TouchContainer
  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
  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
 InheritedchildList : ChildList
Returns the object's childList.
TouchContainer
 InheritedclassName : String
sets the class name of displayobject
TouchContainer
 InheritedcloneExclusions : Vector.<String>
[read-only] Returns a list of properties to exclude when cloning this object
TouchContainer
 InheritedcmlIndex : int
Returns the index created by the CML parser.
TouchContainer
 InheriteddimensionsTo : Object
Sets the dimensions of TouchContainer to given object
TouchContainer
 InheriteddropShadow : Boolean
Sets the drop shadow effect
TouchContainer
  float : Boolean
Sets the boolean flag for decimal or integers.
Stepper
 Inheritedgroup : String
TouchContainer
 Inheritedheight : Number
[override] sets the height of the container
TouchContainer
 InheritedheightPercent : Number
sets the height of the container
TouchContainer
 Inheritedid : String
Returns the object's id.
TouchContainer
  inputTxt : Text
Defines the input text Field
Stepper
 Inheritedlayout : *
specifies the type of layout
TouchContainer
 InheritedlayoutList : Dictionary
TouchContainer
 InheritedmouseChildren : Boolean
[override] sets the mousechildren value to true or false.
TouchContainer
 InheritedpaddingBottom : Number
Sets the number of pixels between the container's bottom border and the bottom of its content area.
TouchContainer
 InheritedpaddingLeft : Number
Sets the number of pixels between the component's left border and the left edge of its content area.
TouchContainer
 InheritedpaddingRight : Number
Sets the number of pixels between the component's right border and the right edge of its content area.
TouchContainer
 InheritedpaddingTop : Number
Sets the number of pixels between the container's top border and the top of its content area.
TouchContainer
 Inheritedposition : *
Sets the position
TouchContainer
 InheritedrelativeX : Boolean
When set true this containers children's x position will be laid out relatively to each other.
TouchContainer
 InheritedrelativeY : Boolean
When set true this containers children's y position will be laid out relatively to each other.
TouchContainer
 Inheritedsound : String
TouchContainer
 Inheritedstate : Dictionary
TouchContainer
 InheritedstateId : *
Returns the current state id.
TouchContainer
  text : Number
Sets the default Number in Text Field
Stepper
  textColor : Number
Sets the text color
Stepper
 InheritedtoBitmap : Boolean
TouchContainer
  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
 Inheritedwidth : Number
[override] sets the width of the container
TouchContainer
 InheritedwidthPercent : Number
sets the width of the container
TouchContainer
Protected Properties
 PropertyDefined By
 InheritedcmlGestureList : Object
TouchContainer
Public Methods
 MethodDefined By
  
Constructor
Stepper
 Inherited
TouchContainer
 Inherited
method searches the child and adds to the list
TouchContainer
 Inherited
addChild(child:DisplayObject):DisplayObject
[override] Adds child to display list and, if not already added, the child list
TouchContainer
 Inherited
addChildAt(child:DisplayObject, index:int):DisplayObject
[override] Adds child to display list and, if not already added, the child list
TouchContainer
 Inherited
applyLayout(value:* = null):void
Apply the containers layout
TouchContainer
 Inherited
childToList(id:String, child:*):void
child appended to the childlist
TouchContainer
 Inherited
clone():*
Clone method
TouchContainer
  
dispose():void
[override] Destructor
Stepper
 Inherited
getElementById(id:String):*
Searches CML childList by id.
TouchContainer
 Inherited
getElementsByClassName(className:String):Array
Searches the CML childList by className.
TouchContainer
 Inherited
getElementsByTagName(tagName:Class):Array
Searches the CML childList by tagName as Class.
TouchContainer
  
init():void
[override] Initializes the configuration and display of Numbers
Stepper
 Inherited
loadState(sId:* = null, recursion:Boolean = false):void
Loads state by index number.
TouchContainer
 Inherited
makeGestureList(value:XMLList):Object
Creates gestureList object from XML
TouchContainer
 Inherited
parseCML(cml:XMLList):XMLList
Parse cml for local layouts.
TouchContainer
 Inherited
postparseCML(cml:XMLList):void
Abstract method allows the setting of a postparse CML routine.
TouchContainer
 Inherited
querySelector(selector:String):*
Searches the CML childList by selector.
TouchContainer
 Inherited
querySelectorAll(selector:*):Array
Search the CML childList by selector.
TouchContainer
 Inherited
removeChild(child:DisplayObject):DisplayObject
[override] Removes child from display list and, if not already removed, the child list
TouchContainer
 Inherited
removeChildAt(index:int):DisplayObject
[override] Removes child from display list and, if not already removed, the child list
TouchContainer
 Inherited
removeChildren(beginIndex:int = 0, endIndex:int = 2147483647):void
[override] Removes children from display list and, if not already removed, the child list
TouchContainer
 Inherited
saveState(sId:* = null, recursion:Boolean = false):void
Save state by index number.
TouchContainer
 Inherited
searchChildren(value:*, returnType:Class = null):*
This method does a depth first search of childLists.
TouchContainer
 Inherited
method sets the dimensions of each child
TouchContainer
 Inherited
tweenState(sId:* = null, tweenTime:Number = 1):void
Tween state by stateIndex from current to given state index.
TouchContainer
 Inherited
Updates child padding within this container
TouchContainer
 Inherited
Updates child percent dimensions within this container
TouchContainer
 Inherited
updateProperties(state:* = 0):void
Updates properties from state.
TouchContainer
 Inherited
Updates child relative positions within this container
TouchContainer
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
dispose()method
override public function dispose():void

Destructor

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

Initializes the configuration and display of Numbers