Package | com.gestureworks.cml.elements |
Class | public class Switch |
Inheritance | Switch ![]() ![]() |
var switch:Switch = new Switch(); switch.backgroundColor = 0x333333; switch.backgroundoutlineColor = 0xFF0000; switch.backgroundlineStroke = 3; switch.buttonColor = 0x000000; switch.buttonoutlineColor = 0x000000; switch.buttonlineStroke = 1; switch.backgroundWidth = 100; switch.backgroundHeight = 50; switch.backgroundEllipseWidth = 25; switch.backgroundEllipseHeight = 25; switch.buttonWidth = 50; switch.buttonHeight = 50; switch.buttonEllipseWidth = 25; switch.buttonEllipseHeight = 25; switch.x = 20; switch.y = 20; addChild(switch);
See also
Property | Defined By | ||
---|---|---|---|
![]() | autoShuffle : Boolean
autoshuffles
| TouchContainer | |
background : Sprite
Defines the background which is a rectangle
| Switch | ||
backgroundColor : uint
Sets the background inside color of the Rounded Rectangle
| Switch | ||
backgroundEllipseHeight : Number
Sets the background Ellipse Height of Rounded Rectangle
| Switch | ||
backgroundEllipseWidth : uint
Sets the background Ellipse Width of Rounded Rectangle
| Switch | ||
backgroundHeight : Number
Sets the background Height of Rounded Rectangle
| Switch | ||
backgroundlineStroke : Number
Sets the background linestroke of the Rounded Rectangle
| Switch | ||
backgroundoutlineColor : uint
Sets the background outline color of Rounded Rectangle
| Switch | ||
backgroundWidth : uint
Sets the background Width of Rounded Rectangle
| Switch | ||
backgroundX : uint
Sets the background X position of Rounded Rectangle
| Switch | ||
backgroundY : uint
Sets the background Y position of Rounded Rectangle
| Switch | ||
button : Sprite
Defines the button of background
| Switch | ||
buttonColor : uint
Sets the button inside color of the Rounded Rectangle
| Switch | ||
buttonEllipseHeight : Number
Sets the button Ellipse Height of Rounded Rectangle
| Switch | ||
buttonEllipseWidth : Number
Sets the button Ellipse Width of Rounded Rectangle
| Switch | ||
buttonHeight : Number
Sets the button Height of Rounded Rectangle
| Switch | ||
buttonlineStroke : Number
Sets the button line stroke of the Rounded Rectangle
| Switch | ||
buttonoutlineColor : uint
Sets the button outline color of Rounded Rectangle
| Switch | ||
buttonWidth : Number
Sets the button Width of Rounded Rectangle
| Switch | ||
buttonX : Number
Sets the button X position of Rounded Rectangle
| Switch | ||
buttonY : Number
Sets the button Y position of Rounded Rectangle
| Switch | ||
![]() | childList : ChildList
Returns the object's childList. | TouchContainer | |
![]() | className : String
sets the class name of displayobject
| TouchContainer | |
![]() | cloneExclusions : Vector.<String> [read-only]
Returns a list of properties to exclude when cloning this object
| TouchContainer | |
![]() | cmlIndex : int
Returns the index created by the CML parser. | TouchContainer | |
![]() | dimensionsTo : Object
Sets the dimensions of TouchContainer to given object
| TouchContainer | |
![]() | dropShadow : Boolean
Sets the drop shadow effect
| TouchContainer | |
![]() | group : String | TouchContainer | |
![]() | height : Number [override]
sets the height of the container
| TouchContainer | |
![]() | heightPercent : Number
sets the height of the container
| TouchContainer | |
![]() | id : String
Returns the object's id. | TouchContainer | |
![]() | layout : *
specifies the type of layout
| TouchContainer | |
![]() | layoutList : Dictionary | TouchContainer | |
![]() | mouseChildren : Boolean [override]
sets the mousechildren value to true or false. | TouchContainer | |
![]() | paddingBottom : Number
Sets the number of pixels between the container's bottom border and the bottom of its content area. | TouchContainer | |
![]() | paddingLeft : Number
Sets the number of pixels between the component's left border and the left edge of its content area. | TouchContainer | |
![]() | paddingRight : Number
Sets the number of pixels between the component's right border and the right edge of its content area. | TouchContainer | |
![]() | paddingTop : Number
Sets the number of pixels between the container's top border and the top of its content area. | TouchContainer | |
![]() | position : *
Sets the position
| TouchContainer | |
![]() | relativeX : Boolean
When set true this containers children's x position will be laid out relatively
to each other. | TouchContainer | |
![]() | relativeY : Boolean
When set true this containers children's y position will be laid out relatively
to each other. | TouchContainer | |
![]() | sound : String | TouchContainer | |
![]() | state : Dictionary | TouchContainer | |
![]() | stateId : *
Returns the current state id. | TouchContainer | |
![]() | toBitmap : Boolean | TouchContainer | |
toggleState : Boolean = false
Defines the button state
| Switch | ||
![]() | width : Number [override]
sets the width of the container
| TouchContainer | |
![]() | widthPercent : Number
sets the width of the container
| TouchContainer |
Method | Defined By | ||
---|---|---|---|
Switch()
Switch Constructor. | Switch | ||
![]() | activateTouch():void | TouchContainer | |
![]() | addAllChildren():void
method searches the child and adds to the list
| TouchContainer | |
![]() | addChild(child:DisplayObject):DisplayObject [override]
Adds child to display list and, if not already added, the child list
| TouchContainer | |
![]() | addChildAt(child:DisplayObject, index:int):DisplayObject [override]
Adds child to display list and, if not already added, the child list
| TouchContainer | |
![]() | applyLayout(value:* = null):void
Apply the containers layout
| TouchContainer | |
![]() | childToList(id:String, child:*):void
child appended to the childlist
| TouchContainer | |
![]() | clone():*
Clone method
| TouchContainer | |
displayButton():void
creates graphics for background and button
| Switch | ||
dispose():void [override]
Destructor
| Switch | ||
![]() | getElementById(id:String):*
Searches CML childList by id. | TouchContainer | |
![]() | getElementsByClassName(className:String):Array
Searches the CML childList by className. | TouchContainer | |
![]() | getElementsByTagName(tagName:Class):Array
Searches the CML childList by tagName as Class. | TouchContainer | |
init():void [override]
Initializes the configuration and display of the Switch
| Switch | ||
![]() | loadState(sId:* = null, recursion:Boolean = false):void
Loads state by index number. | TouchContainer | |
![]() | makeGestureList(value:XMLList):Object
Creates gestureList object from XML
| TouchContainer | |
![]() | parseCML(cml:XMLList):XMLList
Parse cml for local layouts. | TouchContainer | |
![]() | postparseCML(cml:XMLList):void
Abstract method allows the setting of a postparse CML routine. | TouchContainer | |
![]() | querySelector(selector:String):*
Searches the CML childList by selector. | TouchContainer | |
![]() | querySelectorAll(selector:*):Array
Search the CML childList by selector. | TouchContainer | |
![]() | removeChild(child:DisplayObject):DisplayObject [override]
Removes child from display list and, if not already removed, the child list
| TouchContainer | |
![]() | removeChildAt(index:int):DisplayObject [override]
Removes child from display list and, if not already removed, the child list
| TouchContainer | |
![]() | removeChildren(beginIndex:int = 0, endIndex:int = 2147483647):void [override]
Removes children from display list and, if not already removed, the child list
| TouchContainer | |
![]() | saveState(sId:* = null, recursion:Boolean = false):void
Save state by index number. | TouchContainer | |
![]() | searchChildren(value:*, returnType:Class = null):*
This method does a depth first search of childLists. | TouchContainer | |
![]() | setDimensionsToChild():void
method sets the dimensions of each child
| TouchContainer | |
![]() | tweenState(sId:* = null, tweenTime:Number = 1):void
Tween state by stateIndex from current to given state index. | TouchContainer | |
![]() | updatePadding():void
Updates child padding within this container
| TouchContainer | |
![]() | updatePercentDim():void
Updates child percent dimensions within this container
| TouchContainer | |
![]() | updateProperties(state:* = 0):void
Updates properties from state. | TouchContainer | |
![]() | updateRelativePos():void
Updates child relative positions within this container
| TouchContainer |
background | property |
public var background:Sprite
Defines the background which is a rectangle
backgroundColor | property |
backgroundColor:uint
Sets the background inside color of the Rounded Rectangle
The default value is 0xFFFFFF
.
public function get backgroundColor():uint
public function set backgroundColor(value:uint):void
backgroundEllipseHeight | property |
backgroundEllipseHeight:Number
Sets the background Ellipse Height of Rounded Rectangle
The default value is 25
.
public function get backgroundEllipseHeight():Number
public function set backgroundEllipseHeight(value:Number):void
backgroundEllipseWidth | property |
backgroundEllipseWidth:uint
Sets the background Ellipse Width of Rounded Rectangle
The default value is 25
.
public function get backgroundEllipseWidth():uint
public function set backgroundEllipseWidth(value:uint):void
backgroundHeight | property |
backgroundHeight:Number
Sets the background Height of Rounded Rectangle
The default value is 50
.
public function get backgroundHeight():Number
public function set backgroundHeight(value:Number):void
backgroundlineStroke | property |
backgroundlineStroke:Number
Sets the background linestroke of the Rounded Rectangle
The default value is 3
.
public function get backgroundlineStroke():Number
public function set backgroundlineStroke(value:Number):void
backgroundoutlineColor | property |
backgroundoutlineColor:uint
Sets the background outline color of Rounded Rectangle
The default value is 0x333333
.
public function get backgroundoutlineColor():uint
public function set backgroundoutlineColor(value:uint):void
backgroundWidth | property |
backgroundWidth:uint
Sets the background Width of Rounded Rectangle
The default value is 100
.
public function get backgroundWidth():uint
public function set backgroundWidth(value:uint):void
backgroundX | property |
backgroundX:uint
Sets the background X position of Rounded Rectangle
The default value is 0
.
public function get backgroundX():uint
public function set backgroundX(value:uint):void
backgroundY | property |
backgroundY:uint
Sets the background Y position of Rounded Rectangle
The default value is 0
.
public function get backgroundY():uint
public function set backgroundY(value:uint):void
button | property |
public var button:Sprite
Defines the button of background
buttonColor | property |
buttonColor:uint
Sets the button inside color of the Rounded Rectangle
The default value is 0x000000
.
public function get buttonColor():uint
public function set buttonColor(value:uint):void
buttonEllipseHeight | property |
buttonEllipseHeight:Number
Sets the button Ellipse Height of Rounded Rectangle
The default value is 25
.
public function get buttonEllipseHeight():Number
public function set buttonEllipseHeight(value:Number):void
buttonEllipseWidth | property |
buttonEllipseWidth:Number
Sets the button Ellipse Width of Rounded Rectangle
The default value is 25
.
public function get buttonEllipseWidth():Number
public function set buttonEllipseWidth(value:Number):void
buttonHeight | property |
buttonHeight:Number
Sets the button Height of Rounded Rectangle
The default value is 50
.
public function get buttonHeight():Number
public function set buttonHeight(value:Number):void
buttonlineStroke | property |
buttonlineStroke:Number
Sets the button line stroke of the Rounded Rectangle
The default value is 1
.
public function get buttonlineStroke():Number
public function set buttonlineStroke(value:Number):void
buttonoutlineColor | property |
buttonoutlineColor:uint
Sets the button outline color of Rounded Rectangle
The default value is 0x000000
.
public function get buttonoutlineColor():uint
public function set buttonoutlineColor(value:uint):void
buttonWidth | property |
buttonWidth:Number
Sets the button Width of Rounded Rectangle
The default value is 50
.
public function get buttonWidth():Number
public function set buttonWidth(value:Number):void
buttonX | property |
buttonX:Number
Sets the button X position of Rounded Rectangle
The default value is 0
.
public function get buttonX():Number
public function set buttonX(value:Number):void
buttonY | property |
buttonY:Number
Sets the button Y position of Rounded Rectangle
The default value is 0
.
public function get buttonY():Number
public function set buttonY(value:Number):void
toggleState | property |
public var toggleState:Boolean = false
Defines the button state
Switch | () | Constructor |
public function Switch()
Switch Constructor.
displayButton | () | method |
public function displayButton():void
creates graphics for background and button
dispose | () | method |
override public function dispose():void
Destructor
init | () | method |
override public function init():void
Initializes the configuration and display of the Switch