Package | com.gestureworks.cml.elements |
Class | public class TouchContainer |
Inheritance | TouchContainer ![]() |
Implements | IContainer, ICSS, IState |
Subclasses | Accordion, Album, Attract, Background, ColorPicker, Component, Container, DatePicker, Dial, DropDownMenu, FlickrQuery, FlipBook, GestureList, Gigapixel, Graphic, Image, LiveVideo, Magnifier, MaskContainer, Media, Menu, ModestMap, ModestMapMarker, MP3, Paint, Preloader, RadialSlider, RadioButtons, ScrollBar, ScrollPane, SlideMenu, Slider, Slideshow, Stack, StageKit, Stepper, SVG, SWC, SWF, Switch, Tab, TabbedContainer, Text, TLF, Toggle, TouchKeyboard, Video, View, WAV, YouTube |
var tc:TouchContainer = new TouchContainer(); tc.x = 700; tc.y = 300; tc.alpha = .25; tc.scale = 1; //touch interactions tc.gestureList = { "n-drag":true, "n-scale":true, "n-rotate":true }; //loading an image through image element var img:Image = new Image(); img.open("orchid.jpg"); img.x = 0; img.y = 0; img.width = 200; img.rotation = -20; img.id = "img1"; img.scale = 2; tc.addChild(img); //initialise touch container tc.init(); addChild(tc);
See also
Property | Defined By | ||
---|---|---|---|
autoShuffle : Boolean
autoshuffles
| TouchContainer | ||
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 | ||
width : Number [override]
sets the width of the container
| TouchContainer | ||
widthPercent : Number
sets the width of the container
| TouchContainer |
Property | Defined By | ||
---|---|---|---|
cmlGestureList : Object | TouchContainer |
Method | Defined By | ||
---|---|---|---|
TouchContainer(_vto:Object = null)
Constructor
| TouchContainer | ||
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 | ||
dispose():void [override]
Destructor
| TouchContainer | ||
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
Initialisation method
| TouchContainer | ||
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 |
autoShuffle | property |
autoShuffle:Boolean
autoshuffles
public function get autoShuffle():Boolean
public function set autoShuffle(value:Boolean):void
childList | property |
childList:ChildList
Returns the object's childList.
public function get childList():ChildList
public function set childList(value:ChildList):void
className | property |
className:String
sets the class name of displayobject
public function get className():String
public function set className(value:String):void
cloneExclusions | property |
cloneExclusions:Vector.<String>
[read-only] Returns a list of properties to exclude when cloning this object
public function get cloneExclusions():Vector.<String>
cmlGestureList | property |
protected var cmlGestureList:Object
cmlIndex | property |
cmlIndex:int
Returns the index created by the CML parser.
public function get cmlIndex():int
public function set cmlIndex(value:int):void
dimensionsTo | property |
dimensionsTo:Object
Sets the dimensions of TouchContainer to given object
public function get dimensionsTo():Object
public function set dimensionsTo(value:Object):void
dropShadow | property |
dropShadow:Boolean
Sets the drop shadow effect
The default value is false
.
public function get dropShadow():Boolean
public function set dropShadow(value:Boolean):void
group | property |
group:String
public function get group():String
public function set group(value:String):void
height | property |
height:Number
[override] sets the height of the container
public function get height():Number
public function set height(value:Number):void
heightPercent | property |
heightPercent:Number
sets the height of the container
public function get heightPercent():Number
public function set heightPercent(value:Number):void
id | property |
id:String
Returns the object's id.
public function get id():String
public function set id(value:String):void
layout | property |
layout:*
specifies the type of layout
public function get layout():*
public function set layout(value:any):void
layoutList | property |
public var layoutList:Dictionary
mouseChildren | property |
mouseChildren:Boolean
[override] sets the mousechildren value to true or false.
public function get mouseChildren():Boolean
public function set mouseChildren(value:Boolean):void
paddingBottom | property |
paddingBottom:Number
Sets the number of pixels between the container's bottom border and the bottom of its content area.
The default value is 0
.
public function get paddingBottom():Number
public function set paddingBottom(value:Number):void
paddingLeft | property |
paddingLeft:Number
Sets the number of pixels between the component's left border and the left edge of its content area.
The default value is 0
.
public function get paddingLeft():Number
public function set paddingLeft(value:Number):void
paddingRight | property |
paddingRight:Number
Sets the number of pixels between the component's right border and the right edge of its content area.
The default value is 0
.
public function get paddingRight():Number
public function set paddingRight(value:Number):void
paddingTop | property |
paddingTop:Number
Sets the number of pixels between the container's top border and the top of its content area.
The default value is 0
.
public function get paddingTop():Number
public function set paddingTop(value:Number):void
position | property |
position:*
Sets the position
public function get position():*
public function set position(value:any):void
relativeX | property |
relativeX:Boolean
When set true this containers children's x position will be laid out relatively to each other.
public function get relativeX():Boolean
public function set relativeX(value:Boolean):void
relativeY | property |
relativeY:Boolean
When set true this containers children's y position will be laid out relatively to each other.
public function get relativeY():Boolean
public function set relativeY(value:Boolean):void
sound | property |
sound:String
public function get sound():String
public function set sound(value:String):void
state | property |
public var state:Dictionary
stateId | property |
stateId:*
Returns the current state id.
public function get stateId():*
public function set stateId(value:any):void
toBitmap | property |
toBitmap:Boolean
public function get toBitmap():Boolean
public function set toBitmap(value:Boolean):void
width | property |
width:Number
[override] sets the width of the container
public function get width():Number
public function set width(value:Number):void
widthPercent | property |
widthPercent:Number
sets the width of the container
public function get widthPercent():Number
public function set widthPercent(value:Number):void
TouchContainer | () | Constructor |
public function TouchContainer(_vto:Object = null)
Constructor
Parameters_vto:Object (default = null )
|
activateTouch | () | method |
public function activateTouch():void
addAllChildren | () | method |
public function addAllChildren():void
method searches the child and adds to the list
addChild | () | method |
override public function addChild(child:DisplayObject):DisplayObject
Adds child to display list and, if not already added, the child list
Parameters
child:DisplayObject |
DisplayObject —
|
addChildAt | () | method |
override public function addChildAt(child:DisplayObject, index:int):DisplayObject
Adds child to display list and, if not already added, the child list
Parameters
child:DisplayObject | |
index:int |
DisplayObject —
|
applyLayout | () | method |
public function applyLayout(value:* = null):void
Apply the containers layout
Parameters
value:* (default = null )
|
childToList | () | method |
public function childToList(id:String, child:*):void
child appended to the childlist
Parameters
id:String | |
child:* |
clone | () | method |
public function clone():*
Clone method
Returns* |
dispose | () | method |
override public function dispose():void
Destructor
getElementById | () | method |
public function getElementById(id:String):*
Searches CML childList by id. The first object is returned.
Parameters
id:String |
* —
|
getElementsByClassName | () | method |
public function getElementsByClassName(className:String):Array
Searches the CML childList by className. An array of objects are returned.
Parameters
className:String |
Array —
|
getElementsByTagName | () | method |
public function getElementsByTagName(tagName:Class):Array
Searches the CML childList by tagName as Class. An array of objects are returned.
Parameters
tagName:Class |
Array —
|
init | () | method |
public function init():void
Initialisation method
loadState | () | method |
public function loadState(sId:* = null, recursion:Boolean = false):void
Loads state by index number. If the first parameter is NaN, the current state will be saved.
Parameters
sId:* (default = null ) — State index to be loaded.
| |
recursion:Boolean (default = false ) — If true the state will load recursively through the display list starting at current display ojbect.
|
makeGestureList | () | method |
public function makeGestureList(value:XMLList):Object
Creates gestureList object from XML
Parameters
value:XMLList |
Object —
|
parseCML | () | method |
public function parseCML(cml:XMLList):XMLList
Parse cml for local layouts.
Parameters
cml:XMLList |
XMLList —
|
postparseCML | () | method |
public function postparseCML(cml:XMLList):void
Abstract method allows the setting of a postparse CML routine.
Parameters
cml:XMLList |
querySelector | () | method |
public function querySelector(selector:String):*
Searches the CML childList by selector. The first object is returned.
Parameters
selector:String |
* —
|
querySelectorAll | () | method |
public function querySelectorAll(selector:*):Array
Search the CML childList by selector. An array of objects are returned.
Parameters
selector:* |
Array —
|
removeChild | () | method |
override public function removeChild(child:DisplayObject):DisplayObject
Removes child from display list and, if not already removed, the child list
Parameters
child:DisplayObject |
DisplayObject —
|
removeChildAt | () | method |
override public function removeChildAt(index:int):DisplayObject
Removes child from display list and, if not already removed, the child list
Parameters
index:int |
DisplayObject —
|
removeChildren | () | method |
override public function removeChildren(beginIndex:int = 0, endIndex:int = 2147483647):void
Removes children from display list and, if not already removed, the child list
Parameters
beginIndex:int (default = 0 )
| |
endIndex:int (default = 2147483647 )
|
saveState | () | method |
public function saveState(sId:* = null, recursion:Boolean = false):void
Save state by index number. If the first parameter is NaN, the current state will be saved.
Parameters
sId:* (default = null ) — State index to save.
| |
recursion:Boolean (default = false ) — If true the state will save recursively through the display list starting at current display ojbect.
|
searchChildren | () | method |
public function searchChildren(value:*, returnType:Class = null):*
This method does a depth first search of childLists. Search parameter can be a simple CSS selector (id or class) or AS3 Class. If found, a corresponding display object is returned, if not, null is returned. The first occurrance that matches the parameter is returned, unless a returnType of Array (as class) is given;
Parameters
value:* | |
returnType:Class (default = null )
|
* |
setDimensionsToChild | () | method |
public function setDimensionsToChild():void
method sets the dimensions of each child
tweenState | () | method |
public function tweenState(sId:* = null, tweenTime:Number = 1):void
Tween state by stateIndex from current to given state index. If the first parameter is null, the current state will be saved.
Parameters
sId:* (default = null ) — State index to tween.
| |
tweenTime:Number (default = 1 ) — Duration of tween
|
updatePadding | () | method |
public function updatePadding():void
Updates child padding within this container
updatePercentDim | () | method |
public function updatePercentDim():void
Updates child percent dimensions within this container
updateProperties | () | method |
public function updateProperties(state:* = 0):void
Updates properties from state.
Parameters
state:* (default = 0 )
|
updateRelativePos | () | method |
public function updateRelativePos():void
Updates child relative positions within this container