Package | com.gestureworks.cml.elements |
Class | public class Key |
Inheritance | Key ![]() ![]() ![]() ![]() |
var ke:Key = new Key(); ke.text = "a"; ke.init(); addChild(ke);
See also
Property | Defined By | ||
---|---|---|---|
![]() | autoShuffle : Boolean
autoshuffles
| TouchContainer | |
capsOn : Boolean
A flag indicating the "capitalized" state of the text. | Key | ||
charCode : uint
The character code (unicode) value of the key pressed
| Key | ||
![]() | 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 | |
![]() | debug : Boolean = false | Button | |
![]() | dimensionsTo : Object
Sets the dimensions of TouchContainer to given object
| TouchContainer | |
![]() | dispatch : String
Assigns a message to dispatch with a button state event. | Button | |
![]() | dispatchDefault : Boolean = false | Button | |
![]() | down : *
Sets button state association with down event
| Button | |
downTextColor : uint
The color of the text when touched down
| Key | ||
![]() | 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 | |
![]() | hideOnToggle : Boolean
Specifies whether buttons will hide on a toggle event. | Button | |
![]() | hit : *
The hit object is the object recieving the input events
| Button | |
icon : *
The icon displayed on the key element
| Key | ||
![]() | id : String
Returns the object's id. | TouchContainer | |
![]() | initial : *
Sets the initial button state object
| Button | |
initTextColor : uint
The inital text color
| Key | ||
keyCode : uint
The key code (unicode) value of the key pressed
| Key | ||
![]() | layout : *
specifies the type of layout
| TouchContainer | |
![]() | layoutList : Dictionary | TouchContainer | |
![]() | mouseChildren : Boolean [override]
sets the mousechildren value to true or false. | TouchContainer | |
![]() | mouseDown : *
Sets button state association with mouse down event
| Button | |
![]() | mouseOut : *
Sets button state association with mouse out event
| Button | |
![]() | mouseOver : *
Sets button state association with mouse over event
| Button | |
![]() | mouseUp : *
Sets button state association with mouse up event
| Button | |
![]() | out : *
Sets button state association with out event
| Button | |
outputText : Boolean
Instructs the TouchKeyboard to bypass the KeyboardEvent evaluation and output the text
instead. | Key | ||
outTextColor : uint
The text color when touched out
| Key | ||
![]() | over : *
Sets button state association with over event (mouse only)
| Button | |
overTextColor : uint
The text color when touched over
| Key | ||
![]() | 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 | |
shiftCharCode : uint
The character code (unicode) value of the key pressed while in a shift state
| Key | ||
shiftOn : Boolean
A flag indicating the shift state of the text. | Key | ||
shiftText : String
The text displayed on the key while in a shift state
| Key | ||
![]() | side : String
Attaches an event string to a button to listen for to toggle visibility when that event is dispatched. | Button | |
![]() | sound : String | TouchContainer | |
![]() | state : Dictionary | TouchContainer | |
![]() | stateId : *
Returns the current state id. | TouchContainer | |
![]() | tap : *
Sets the button state association with tap event. | Button | |
text : *
The text displayed on the key
| Key | ||
![]() | toBitmap : Boolean | TouchContainer | |
![]() | toggle : String
An alternative to button state events, the toggle displays the next child at each event defined by the
toggle value (e.g. | Button | |
![]() | touchDown : *
Sets button state association with touch down event
| Button | |
![]() | touchOut : *
Sets button state association with touch out event
| Button | |
![]() | touchOver : *
Sets button state association with touch out event
| Button | |
![]() | touchUp : *
Sets button state association with touch up event
| Button | |
![]() | up : *
Sets button state association with up event
| Button | |
upTextColor : uint
The text color when touched up
| Key | ||
![]() | width : Number [override]
sets the width of the container
| TouchContainer | |
![]() | widthPercent : Number
sets the width of the container
| TouchContainer |
Method | Defined By | ||
---|---|---|---|
Key()
Constructor
| Key | ||
![]() | 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():* [override]
Returns clone of self
| Button | |
dispose():void [override]
Destructor
| Key | ||
![]() | 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]
Initialization function
| Key | ||
![]() | loadState(sId:* = null, recursion:Boolean = false):void
Loads state by index number. | TouchContainer | |
![]() | makeGestureList(value:XMLList):Object
Creates gestureList object from XML
| TouchContainer | |
![]() | onFlip(e:StateEvent):void | Button | |
![]() | 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 | |
![]() | reset():void | Button | |
![]() | runToggle():void | Button | |
![]() | 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 | |
setup():void
Setup object
| Key | ||
![]() | tweenState(sId:* = null, tweenTime:Number = 1):void
Tween state by stateIndex from current to given state index. | TouchContainer | |
![]() | updateLayout():void
Updates dimensions
| Button | |
![]() | 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 |
Method | Defined By | ||
---|---|---|---|
onDown(event:*):void [override]
The down event handler. | Key | ||
![]() | onMouseDown(event:*):void
Processes the mouse down event by displaying the mouseDown state and hiding the other states. | Button | |
![]() | onMouseOut(event:*):void
Processes the mouse out event by displaying the mouseOut state and hiding the other states. | Button | |
![]() | onMouseOver(event:*):void
Processes the mouse over event by displaying the mouseOver state and hiding the other states. | Button | |
![]() | onMouseUp(event:*):void
Processes the mouse up event by displaying the mouseUp state and hiding the other states. | Button | |
onOut(event:*):void [override]
The out event handler. | Key | ||
onOver(event:*):void [override]
The over event handler. | Key | ||
![]() | onTap(event:*):void | Button | |
![]() | onToggle(event:*):void
Displays the the next child on the specified button event. | Button | |
![]() | onTouchBegin(event:*):void
Processes the touch down event by displaying the touchDown state and hiding the other states. | Button | |
![]() | onTouchOut(event:*):void
Processes the touch out event by displaying the touchOut state and hiding the other states. | Button | |
![]() | onTouchOver(event:*):void
Processes the touch over event by displaying the touchOver state and hiding the other states. | Button | |
![]() | onTouchUp(event:*):void
Processes the touch up event by displaying the touchUp state and hiding the other states. | Button | |
onUp(event:*):void [override]
The up event handler. | Key |
capsOn | property |
capsOn:Boolean
A flag indicating the "capitalized" state of the text. Only valid for letter characters.
public function get capsOn():Boolean
public function set capsOn(value:Boolean):void
charCode | property |
charCode:uint
The character code (unicode) value of the key pressed
public function get charCode():uint
public function set charCode(value:uint):void
downTextColor | property |
downTextColor:uint
The color of the text when touched down
public function get downTextColor():uint
public function set downTextColor(value:uint):void
icon | property |
icon:*
The icon displayed on the key element
public function get icon():*
public function set icon(value:any):void
initTextColor | property |
initTextColor:uint
The inital text color
public function get initTextColor():uint
public function set initTextColor(value:uint):void
keyCode | property |
keyCode:uint
The key code (unicode) value of the key pressed
public function get keyCode():uint
public function set keyCode(value:uint):void
outputText | property |
outputText:Boolean
Instructs the TouchKeyboard
to bypass the KeyboardEvent evaluation and output the text
instead. This is a useful setting for key text without valid character or key codes. For example, setting
this flag on a key having a text value of '.com', will output '.com' in the designated text field.
public function get outputText():Boolean
public function set outputText(value:Boolean):void
outTextColor | property |
outTextColor:uint
The text color when touched out
public function get outTextColor():uint
public function set outTextColor(value:uint):void
overTextColor | property |
overTextColor:uint
The text color when touched over
public function get overTextColor():uint
public function set overTextColor(value:uint):void
shiftCharCode | property |
shiftCharCode:uint
The character code (unicode) value of the key pressed while in a shift state
public function get shiftCharCode():uint
public function set shiftCharCode(value:uint):void
shiftOn | property |
shiftOn:Boolean
A flag indicating the shift state of the text. Any key can have a text value for a shift state and one for the initial state.
public function get shiftOn():Boolean
public function set shiftOn(value:Boolean):void
shiftText | property |
shiftText:String
The text displayed on the key while in a shift state
public function get shiftText():String
public function set shiftText(value:String):void
text | property |
text:*
The text displayed on the key
public function get text():*
public function set text(value:any):void
upTextColor | property |
upTextColor:uint
The text color when touched up
public function get upTextColor():uint
public function set upTextColor(value:uint):void
Key | () | Constructor |
public function Key()
Constructor
dispose | () | method |
override public function dispose():void
Destructor
init | () | method |
override public function init():void
Initialization function
onDown | () | method |
override protected function onDown(event:*):void
The down event handler. Dispatches a KEY_DOWN event containing the character key codes. The key location has an arbitrary value (10) to identify its origin.
Parameters
event:* — event triggered when touched/clicked
|
onOut | () | method |
override protected function onOut(event:*):void
The out event handler.
Parameters
event:* — event triggered when a key is released from an over event
|
onOver | () | method |
override protected function onOver(event:*):void
The over event handler.
Parameters
event:* — event triggered when a key is intersected from outside
|
onUp | () | method |
override protected function onUp(event:*):void
The up event handler.
Parameters
event:* — event triggered when a key is released from a down event
|
setup | () | method |
public function setup():void
Setup object