Packagecom.gestureworks.cml.element
Classpublic class MaskContainer
InheritanceMaskContainer Inheritance TouchContainer Inheritance TouchContainerFactory Inheritance TouchSprite Inheritance flash.display.Sprite

The MaskContainer element takes in one or multiple images and applies a mask designated in CML to all images in its child list. If there are multiple images, the class automatically cycles through them using double-tap. The gesture may be turned off in CML. This element is touch-enabled already, and does not need to be wrapped in a touchContainer.
     
       var maskContainer:MaskContainer = new MaskContainer();
        maskContainer.maskShape = "rectangle";
        maskContainer.maskWidth = 100;
        maskContainer.maskHeight = 64;
        maskContainer.maskBorderColor = 0xff0000;
        maskContainer.maskBorderStroke = 2;
        maskContainer.maskBorderAlpha = 0.75;
        
        maskContainer.addChild(img);
        maskContainer.childToList("image", img);
        maskContainer.init();
     
     

See also

TouchContainer


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
 InheritedcloneExclusions : 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
  counter : Number
[read-only]
MaskContainer
 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
  dragAngle : Number
MaskContainer
 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
 InheritedlayoutComplete : Function
Sets the function to call when the layout is complete
TouchContainer
 InheritedlayoutList : Dictionary
TouchContainer
 InheritedlayoutUpdate : Function
Sets the function to call when the layout updates
TouchContainer
  maskBorderAlpha : Number
Alpha for the border of the mask if desired.
MaskContainer
  maskBorderColor : uint
Mask border color, if a border is desired around the mask element.
MaskContainer
  maskBorderStroke : Number
The thickness of the border in pixels.
MaskContainer
  maskHeight : Number
Mask height for rectangles.
MaskContainer
  maskRadius : Number
The property for the mask radius if the shape is a circle.
MaskContainer
  maskRotation : Number
Set the starting rotation of the mask.
MaskContainer
  maskShape : String
The string property to designate the shape the mask will be.
MaskContainer
  maskWidth : Number
Mask width for rectangles.
MaskContainer
  maskX : Number
Set the mask's starting X position.
MaskContainer
  maskY : Number
Set the mask's starting Y position.
MaskContainer
 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
  mShape : Graphic
[read-only]
MaskContainer
 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
 Inheritedscale : 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
  touchScreen : TouchContainer
[read-only]
MaskContainer
 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
  borderShape : Graphic
MaskContainer
 InheritedcmlGestureList : Object
TouchContainerFactory
  graphicArray : List
MaskContainer
  hitShape : Graphic
MaskContainer
  _mShape : Graphic
MaskContainer
  overallMask : Graphic
MaskContainer
  _touchScreen : TouchContainer
MaskContainer
  wShape : Graphic
MaskContainer
Public Methods
 MethodDefined By
  
Constructor
MaskContainer
 Inherited
TODO
TouchContainerFactory
 Inherited
method searches the child and adds to the list
TouchContainerFactory
 Inherited
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
  
MaskContainer
  
alphaShift(n:Number):void
MaskContainer
 Inherited
applyLayout(value:* = null):void
Apply the containers layout
TouchContainer
 Inherited
childToList(id:String, child:*):void
child appended to the childlist
TouchContainerFactory
 Inherited
clone():*
Clone method
TouchContainer
  
cycleMasks(e:GWGestureEvent = null):void
cycles through multiple images
MaskContainer
  
[override] CML call back Initialisation
MaskContainer
  
dispose():void
[override] Dispose method to nullify listeners
MaskContainer
 Inherited
hideIndex(index:int):void
hides child list index
TouchContainer
 Inherited
hideKey(key:String):void
hides childlist key visibility
TouchContainer
  
init():void
[override] Initialisation method
MaskContainer
 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
 Inherited
parseCML(cml:XMLList):XMLList
[override] Parse cml for local layouts.
TouchContainer
 Inherited
postparseCML(cml:XMLList):void
postparse method
TouchContainerFactory
  
reset():void
MaskContainer
 Inherited
searchChildren(value:*, returnType:Class = null):*
This method does a depth first search of childLists.
TouchContainer
 Inherited
method sets the dimensions of each child
TouchContainerFactory
 Inherited
showIndex(index:int):void
shows index of the child list
TouchContainer
 Inherited
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
_mShapeproperty
protected var _mShape:Graphic

_touchScreenproperty 
protected var _touchScreen:TouchContainer

borderShapeproperty 
protected var borderShape:Graphic

counterproperty 
counter:Number  [read-only]


Implementation
    public function get counter():Number
dragAngleproperty 
dragAngle:Number


Implementation
    public function get dragAngle():Number
    public function set dragAngle(value:Number):void
graphicArrayproperty 
protected var graphicArray:List

hitShapeproperty 
protected var hitShape:Graphic

maskBorderAlphaproperty 
maskBorderAlpha:Number

Alpha for the border of the mask if desired. Must be set between 0 and 1 to be visible.

The default value is 0;.


Implementation
    public function get maskBorderAlpha():Number
    public function set maskBorderAlpha(value:Number):void
maskBorderColorproperty 
maskBorderColor:uint

Mask border color, if a border is desired around the mask element.

The default value is 0x000000;.


Implementation
    public function get maskBorderColor():uint
    public function set maskBorderColor(value:uint):void
maskBorderStrokeproperty 
maskBorderStroke:Number

The thickness of the border in pixels.

The default value is 0;.


Implementation
    public function get maskBorderStroke():Number
    public function set maskBorderStroke(value:Number):void
maskHeightproperty 
maskHeight:Number

Mask height for rectangles.


Implementation
    public function get maskHeight():Number
    public function set maskHeight(value:Number):void
maskRadiusproperty 
maskRadius:Number

The property for the mask radius if the shape is a circle.


Implementation
    public function get maskRadius():Number
    public function set maskRadius(value:Number):void
maskRotationproperty 
maskRotation:Number

Set the starting rotation of the mask.


Implementation
    public function get maskRotation():Number
    public function set maskRotation(value:Number):void
maskShapeproperty 
maskShape:String

The string property to designate the shape the mask will be. "rectangle" or "circle" are options.


Implementation
    public function get maskShape():String
    public function set maskShape(value:String):void
maskWidthproperty 
maskWidth:Number

Mask width for rectangles.


Implementation
    public function get maskWidth():Number
    public function set maskWidth(value:Number):void
maskXproperty 
maskX:Number

Set the mask's starting X position.


Implementation
    public function get maskX():Number
    public function set maskX(value:Number):void
maskYproperty 
maskY:Number

Set the mask's starting Y position.


Implementation
    public function get maskY():Number
    public function set maskY(value:Number):void
mShapeproperty 
mShape:Graphic  [read-only]


Implementation
    public function get mShape():Graphic
overallMaskproperty 
protected var overallMask:Graphic

touchScreenproperty 
touchScreen:TouchContainer  [read-only]


Implementation
    public function get touchScreen():TouchContainer
wShapeproperty 
protected var wShape:Graphic

Constructor Detail
MaskContainer()Constructor
public function MaskContainer()

Constructor

Method Detail
alphaHandler()method
public function alphaHandler(e:GWGestureEvent):void

Parameters

e:GWGestureEvent

alphaShift()method 
public function alphaShift(n:Number):void

Parameters

n:Number

cycleMasks()method 
public function cycleMasks(e:GWGestureEvent = null):void

cycles through multiple images

Parameters

e:GWGestureEvent (default = null)

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

CML call back Initialisation

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

Dispose method to nullify listeners

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

Initialisation method

reset()method 
public function reset():void