Packagecom.gestureworks.cml.element
Classpublic class TouchContainer
InheritanceTouchContainer Inheritance TouchContainerFactory Inheritance TouchSprite Inheritance flash.display.Sprite
Subclasses Album, AttractKit, Component, Gigapixel, GraphicFactory, Magnifier, MaskContainer, Media, Model3D, ScrollBar, ScrollPane, Stack, StageKit, Video, VideoFactory, View

TouchContainer can be used to create interative display containers. It is the CML version of TouchSprite. It keeps track of children through the childlist property.
        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

Container
Gesture
GestureList


Public Properties
 PropertyDefined By
 Inherited_$height : Number = 0
TouchSprite
 Inherited_$rotation : Number = 0
TouchSprite
 Inherited$rotation : Number
TouchSprite
 Inherited_$scaleX : Number = 1
TouchSprite
 Inherited$scaleX : Number
TouchSprite
 Inherited_$scaleY : Number = 1
TouchSprite
 Inherited$scaleY : Number
TouchSprite
 Inherited$transformPoint : Point
TouchSprite
 Inherited_$width : Number = 0
TouchSprite
 Inherited_$x : Number = 0
TouchSprite
 Inherited$x : Number
TouchSprite
 Inherited_$y : Number = 0
TouchSprite
 Inherited$y : Number
TouchSprite
 InheritedautoShuffle : Boolean
autoshuffles
TouchContainerFactory
 InheritedbroadcastTarget : Boolean
TouchSprite
 InheritedchildList : ChildList
[read-only] returns the childlist
TouchContainerFactory
 Inheritedclass_ : String
Object's css class;
TouchContainerFactory
 InheritedclassName : String
sets the class name of displayobject
TouchContainerFactory
  cloneExclusions : Vector.<String>
[read-only] Returns a list of properties to exclude when cloning this object
TouchContainer
 InheritedclusterBubbling : Boolean
Allows touch points from a childclusters to copy into container touch objects in the local parent child display list stack.
TouchSprite
 InheritedclusterEvents : Boolean
Determins whether clusterEvents are processed and dispatched on the touchSprite.
TouchSprite
 InheritedclusterID : int
TouchSprite
 InheritedcmlIndex : int
sets the cml index
TouchContainerFactory
 Inheritedcml_item : Boolean
TouchSprite
 InheritedcO : ClusterObject
TouchSprite
 InheriteddebugDisplay : Boolean
TouchSprite
 InheriteddeltaFilterOn : Boolean
Determins whether filtering is applied to the delta values.
TouchSprite
 InheriteddimensionsTo : String
sets the dimensions of touchcontainer
TouchContainerFactory
 InheriteddisableAffineTransform : Boolean
Determins whether internal (native) transformations are affine (dynamically centered) on the touchSprite.
TouchSprite
 InheriteddisableNativeTransform : Boolean
Determins whether transformations are handled internally (natively) on the touchSprite.
TouchSprite
 InheriteddN : Number
TouchSprite
 InheriteddropShadow : Boolean
Sets the drop shadow effect
TouchContainerFactory
 InheritedGESTRELIST_UPDATE : String = gestureList update
[static]
TouchSprite
 InheritedgestureEventComplete : Boolean
Indicates weather all gestureEvents have been completed on the touchSprite.
TouchSprite
 InheritedgestureEventRelease : Boolean
Indicates whether all touch points have been released on the touchSprite.
TouchSprite
 InheritedgestureEvents : Boolean
Determins whether gestureEvents are processed and dispatched on the touchSprite.
TouchSprite
 InheritedgestureEventStart : Boolean
Indicates whether any gestureEvents have been started on the touchSprite.
TouchSprite
 InheritedgestureFilters : Boolean
TouchSprite
 InheritedgestureList : Object
TouchSprite
 InheritedgestureReleaseInertia : Boolean
Determins whether release inertia is given to gestureEvents on the touchSprite.
TouchSprite
 InheritedgestureTouchInertia : Boolean
Determins whether touch inertia is processed on the touchSprite.
TouchSprite
 Inherited_gestureTweenOn : Boolean = false
TouchSprite
 InheritedgestureTweenOn : Boolean
TouchSprite
 InheritedgO : GestureListObject
TouchSprite
 Inheritedgroup : String
TouchContainerFactory
 Inheritedheight : Number
[override] sets the height of the container
TouchContainerFactory
 Inheritedid : String
sets childlist id
TouchContainerFactory
 Inheritedlayout : *
speciffies the type of layout
TouchContainerFactory
  layoutComplete : Function
Sets the function to call when the layout is complete
TouchContainer
  layoutList : Dictionary
TouchContainer
  layoutUpdate : Function
Sets the function to call when the layout updates
TouchContainer
 InheritedmaxScale : Number
This method is called after class initialization.
TouchContainerFactory
 InheritedminScale : Number
This method is called after class initialization.
TouchContainerFactory
 InheritedmouseChildren : Boolean
[override] sets the mousechildren value to true or false.
TouchContainerFactory
 InheritedN : int
TouchSprite
 InheritednestedTransform : Boolean
TouchSprite
 Inheritedoutline_alpha : Number
sets the alpha of outline
TouchContainerFactory
 Inheritedoutline_color : Number
sets the color of outline
TouchContainerFactory
 Inheritedoutline_joint : String
TODO
TouchContainerFactory
 InheritedoutlineOn : String
specifies the outline of container to true or false
TouchContainerFactory
 Inheritedoutline_stroke : int
sets the line stroke of outline
TouchContainerFactory
 InheritedpointArray : Vector.<PointObject>
[read-only]
TouchSprite
 InheritedpointCount : int
TouchSprite
 InheritedpropertyStates : Array
Deprecated: Please Use state
TouchContainerFactory
  scale : Number
Scales display object
TouchContainer
 InheritedsO : StrokeObject
TouchSprite
 Inheritedstate : Array
property states array
TouchContainerFactory
 Inheritedtargeting : Boolean
Turns off manual ALL targeting control, defaults to a simple hit test targeting model with exclusive target clustering
TouchSprite
 InheritedtargetList : Array
Allows touch and gesture events to explicitly target a group of defined touch objects which can be outside of the local parent child display list stack
TouchSprite
 InheritedtargetObject : Object
Allows touch and gesture events to explicitly target a touch object this can be outside the local parent child display list stack
TouchSprite
 InheritedtargetParent : Boolean
Allows touch and gesture events to explicitly target the parent touch object
TouchSprite
 Inheritedtc : TouchCluster
TouchSprite
 Inheritedtd : TouchDebugDisplay
TouchSprite
 Inheritedtg : TouchGesture
TouchSprite
 InheritedtiO : TimelineObject
TouchSprite
 InheritedtouchChildren : Boolean
TouchSprite
 InheritedtouchObjectID : int
[read-only]
TouchSprite
 Inheritedtp : TouchPipeline
TouchSprite
 InheritedtraceDebugModeOn : Boolean
TouchSprite
 InheritedtransformComplete : Boolean
TouchSprite
 InheritedtransformEventComplete : Boolean
TouchSprite
 InheritedtransformEvents : Boolean
Determins whether transformEvents are processed and dispatched on the touchSprite.
TouchSprite
 InheritedtransformEventStart : Boolean
TouchSprite
 InheritedtransformGestureVectors : Boolean
Determins whether transformations are handled internally (natively) on the touchSprite.
TouchSprite
 InheritedtransformStart : Boolean
TouchSprite
 InheritedtrO : TransformObject
TouchSprite
 Inheritedtt : TouchTransform
TouchSprite
 Inheritedwidth : Number
[override] sets the width of the container
TouchContainerFactory
 Inheritedx_lock : Boolean
TouchSprite
 Inheritedy_lock : Boolean
TouchSprite
Protected Properties
 PropertyDefined By
 InheritedcmlGestureList : Object
TouchContainerFactory
Public Methods
 MethodDefined By
  
Constructor
TouchContainer
 Inherited
TODO
TouchContainerFactory
 Inherited
method searches the child and adds to the list
TouchContainerFactory
  
addChild(child:DisplayObject):DisplayObject
[override] Adds child to display list and, if not already added, the child list
TouchContainer
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
[override] Registers event listeners.
TouchSprite
  
applyLayout(value:* = null):void
Apply the containers layout
TouchContainer
 Inherited
childToList(id:String, child:*):void
child appended to the childlist
TouchContainerFactory
  
clone():*
Clone method
TouchContainer
  
[override]
TouchContainer
  
dispose():void
[override] Dispose method
TouchContainer
  
hideIndex(index:int):void
hides child list index
TouchContainer
  
hideKey(key:String):void
hides childlist key visibility
TouchContainer
  
init():void
Initialisation method
TouchContainer
 Inherited
makeGestureList(value:XMLList):Object
TODO
TouchContainerFactory
 Inherited
onTouchDown(event:TouchEvent, target:* = null):void
decides how to assign the captured touch point to a cluster can pass to parent, an explicit target, an explicit list or targets or a passed to any touch object in the local display stack.
TouchSprite
  
parseCML(cml:XMLList):XMLList
[override] Parse cml for local layouts.
TouchContainer
 Inherited
postparseCML(cml:XMLList):void
postparse method
TouchContainerFactory
  
searchChildren(value:*, returnType:Class = null):*
This method does a depth first search of childLists.
TouchContainer
 Inherited
method sets the dimensions of each child
TouchContainerFactory
  
showIndex(index:int):void
shows index of the child list
TouchContainer
  
showKey(key:String):void
shows the child list key visibility
TouchContainer
 Inherited
TouchSprite
 Inherited
TouchSprite
 Inherited
TouchSprite
 Inherited
Registers/unregisters event handlers depending on the active modes
TouchSprite
 Inherited
TouchSprite
 Inherited
updateProperties(state:Number = 0):void
update properties of child
TouchContainerFactory
 Inherited
TouchSprite
 Inherited
TouchSprite
Protected Methods
 MethodDefined By
 Inherited
This method is called after class initialization.
TouchContainerFactory
 Inherited
This method is called after class initialization.
TouchContainerFactory
 Inherited
randomMinMax(min:Number, max:Number):Number
This method is called after class initialization.
TouchContainerFactory
 Inherited
This method is called after class initialization.
TouchContainerFactory
 Inherited
thumbUpdate(event:Event):void
This method is called after class initialization.
TouchContainerFactory
Property Detail
cloneExclusionsproperty
cloneExclusions:Vector.<String>  [read-only]

Returns a list of properties to exclude when cloning this object


Implementation
    public function get cloneExclusions():Vector.<String>
layoutCompleteproperty 
layoutComplete:Function

Sets the function to call when the layout is complete


Implementation
    public function get layoutComplete():Function
    public function set layoutComplete(value:Function):void
layoutListproperty 
public var layoutList:Dictionary

layoutUpdateproperty 
layoutUpdate:Function

Sets the function to call when the layout updates


Implementation
    public function get layoutUpdate():Function
    public function set layoutUpdate(value:Function):void
scaleproperty 
scale:Number

Scales display object


Implementation
    public function get scale():Number
    public function set scale(value:Number):void
Constructor Detail
TouchContainer()Constructor
public function TouchContainer()

Constructor

Method Detail
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

Returns
DisplayObject
applyLayout()method 
public function applyLayout(value:* = null):void

Apply the containers layout

Parameters

value:* (default = null)

clone()method 
public function clone():*

Clone method

Returns
*
displayComplete()method 
override public function displayComplete():void

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

Dispose method

hideIndex()method 
public function hideIndex(index:int):void

hides child list index

Parameters

index:int

hideKey()method 
public function hideKey(key:String):void

hides childlist key visibility

Parameters

key:String

init()method 
public function init():void

Initialisation method

parseCML()method 
override public function parseCML(cml:XMLList):XMLList

Parse cml for local layouts.

Parameters

cml:XMLList

Returns
XMLList
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.

Parameters

value:*
 
returnType:Class (default = null)

Returns
*
showIndex()method 
public function showIndex(index:int):void

shows index of the child list

Parameters

index:int

showKey()method 
public function showKey(key:String):void

shows the child list key visibility

Parameters

key:String