Package | com.gestureworks.cml.element |
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 | ||
---|---|---|---|
![]() | alpha : Number [override] [write-only]
sets the alpha for display objects
| ElementFactory | |
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 | ||
![]() | blur : Boolean
Sets the drop shadow effect
| ElementFactory | |
![]() | bottom : Number
sets the bottom value
| ElementFactory | |
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 | ||
![]() | class_ : String
Object's css class;
| ElementFactory | |
![]() | className : String
sets the class name of displayobject
| ElementFactory | |
![]() | cmlIndex : int
sets the cml index
| ElementFactory | |
![]() | debugStyle : *
sets the debug style
| ElementFactory | |
![]() | displayEvents : String
Use for dispatch completes. | ElementFactory | |
![]() | dropShadow : Boolean
Sets the drop shadow effect
| ElementFactory | |
![]() | height : Number [override]
Sets width of the display object in pixels
| ElementFactory | |
![]() | heightPercent : String
sets the height percent of display object
| ElementFactory | |
![]() | horizontalCenter : Number
sets the horizontal center of display object
| ElementFactory | |
![]() | id : String
sets the id of child
| ElementFactory | |
![]() | index : int
sets the index of display object
| ElementFactory | |
![]() | left : Number
sets left value
| ElementFactory | |
![]() | propertyStates : Array Deprecated: Please Use state | ElementFactory | |
![]() | right : Number
sets the right value
| ElementFactory | |
![]() | scale : Number
Sets both the x and y scale values
| ElementFactory | |
![]() | scaleX : Number [override]
Sets width of the display object in pixels
| ElementFactory | |
![]() | scaleY : Number [override]
Sets width of the display object in pixels
| ElementFactory | |
![]() | state : Array
property states array
| ElementFactory | |
toggleState : Boolean = false
Defines the button state
| Switch | ||
![]() | top : Number
sets top value
| ElementFactory | |
![]() | verticalCenter : Number
sets the vertical center of display object
| ElementFactory | |
![]() | width : Number [override]
Sets width of the display object in pixels
| ElementFactory | |
![]() | widthPercent : String
sets the percent of width of display object
| ElementFactory |
Method | Defined By | ||
---|---|---|---|
Switch()
Switch Constructor. | Switch | ||
![]() | clone():*
Returns clone of self
| ElementFactory | |
displayButton():void
creates graphics for background and button
| Switch | ||
displayComplete():void [override]
CML display initialization callback
| Switch | ||
dispose():void [override]
Dispose method
| Switch | ||
init():void [override]
Initializes the configuration and display of the Switch
| Switch | ||
![]() | parseCML(cml:XMLList):XMLList
parses cml file
| ElementFactory | |
![]() | postparseCML(cml:XMLList):void
post parses the cml file
| ElementFactory | |
![]() | updateProperties(state:Number = 0):void
this method updates the properties
| ElementFactory |
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
displayComplete | () | method |
override public function displayComplete():void
CML display initialization callback
dispose | () | method |
override public function dispose():void
Dispose method
init | () | method |
override public function init():void
Initializes the configuration and display of the Switch