Packagecom.gestureworks.cml.element
Classpublic class Album
InheritanceAlbum Inheritance TouchContainer Inheritance TouchContainerFactory Inheritance TouchSprite Inheritance flash.display.Sprite
Subclasses MenuAlbum

The Album element provides a list of display objects that can be scrolled horizontally or vertically using a drag gesture. It supports tweening and item snapping.
     
        // horizontal album
        var h_album:AlbumElement = new AlbumElement();
        h_album.addChild(getImageElement("assets/wb3.jpg"));
        h_album.addChild(getImageElement("assets/USS_Macon_over_Manhattan.png"));
        h_album.addChild(getImageElement("assets/wb3.jpg"));
        h_album.init();

        // vertical album
        var v_album:AlbumElement = new AlbumElement();
        v_album.horizontal = false;            
        v_album.addChild(getImageElement("assets/wb3.jpg"));
        v_album.addChild(getImageElement("assets/USS_Macon_over_Manhattan.png"));                        
        v_album.addChild(getImageElement("assets/wb3.jpg"));            
        v_album.init();
    
    // the supporting method getImageElement("src"), returns a Image display
    // object.
            
     

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
  applyMask : Boolean
Flag indicating whether the contents are masked
Album
 InheritedautoShuffle : Boolean
autoshuffles
TouchContainerFactory
  backgroundColor : uint
The color of the album's background
Album
  belt : TouchContainer
[read-only] The primary container and interactive object
Album
 InheritedbroadcastTarget : Boolean
TouchSprite
  centerContent : Boolean
Flag indicating the album items should be centered horizontally and vertically
Album
 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
  clusterBubbling : Boolean
[override] Redirect clusterBubbling setting to the belt
Album
 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
  currentSnapPoint : Number
[read-only] Returns the index of the current snap point
Album
 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
Intended to account for the rotation of the parent object to apply to drag transformations.
Album
  dragGesture : String
Specifies the GML drag gesture of the belt (e.g.
Album
 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
  height : Number
[override] Sets the height of the container and associated mask
Album
  horizontal : Boolean
Flag indicating the scroll axis
Album
 Inheritedid : String
sets childlist id
TouchContainerFactory
  layout : *
[override] The album element is intended for a ListLayout only.
Album
 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
  loop : Boolean
A flag instructing the album to continuously cycle through the objects opposed to stopping at the beginning or end.
Album
  loopQueue : Array
[read-only] The queue storing the order of children in the loop from head to tail
Album
  margin : Number
Sets the margin between the child display objects
Album
 InheritedmaxScale : Number
This method is called after class initialization.
TouchContainerFactory
 InheritedminScale : Number
This method is called after class initialization.
TouchContainerFactory
  mouseChildren : Boolean
[override] Redirect mouseChidren setting to the belt
Album
 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
  rotation : Number
[override] [write-only] Synchronize the drag angle with the album's rotation
Album
  rotationX : Number
[override] [write-only] Synchronize the drag angle with the album's rotation
Album
  rotationY : Number
[override] [write-only] Synchronize the drag angle with the album's rotation
Album
 Inheritedscale : Number
Scales display object
TouchContainer
  snapping : Boolean
A flag indicating the snap animation of the objects into place
Album
 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
  width : Number
[override] Sets the width of the container and associated mask
Album
 Inheritedx_lock : Boolean
TouchSprite
 Inheritedy_lock : Boolean
TouchSprite
Protected Properties
 PropertyDefined By
 InheritedcmlGestureList : Object
TouchContainerFactory
Public Methods
 MethodDefined By
  
Constructor
Album
 Inherited
TODO
TouchContainerFactory
 Inherited
method searches the child and adds to the list
TouchContainerFactory
  
addChild(child:DisplayObject):DisplayObject
[override] Reroutes the addition of children from the album to the album's belt and sets the dimesions of the container based on the greatest width and height of the child dimensions.
Album
  
addChildAt(child:DisplayObject, index:int):DisplayObject
[override] Reroutes the addition of children from the album to the album's belt and sets the dimesions of the container based on the greatest width and height of the child dimensions.
Album
 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
[override] The album element is intended for a ListLayout only.
Album
 Inherited
childToList(id:String, child:*):void
child appended to the childlist
TouchContainerFactory
  
clear():void
Removes belt children and resets initial album states
Album
 Inherited
clone():*
Clone method
TouchContainer
  
[override] CML initialization
Album
  
dispose():void
[override] Destructor
Album
 Inherited
hideIndex(index:int):void
hides child list index
TouchContainer
 Inherited
hideKey(key:String):void
hides childlist key visibility
TouchContainer
  
init():void
[override] Initialization function
Album
 Inherited
makeGestureList(value:XMLList):Object
TODO
TouchContainerFactory
  
next():void
Snap to the next item on the belt
Album
  
objectAtSnapPoint(point:int):*
Returns the object at the current stap point
Album
 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
  
previous():void
Snap to the previous item on the belt
Album
  
reset():void
Album
 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
  
snapTo(num:Number):void
Album
 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
  
updateState(album:Album):void
Intended to synchronize this album with another's state when album linking through the AlbumViewer.
Album
 Inherited
TouchSprite
Protected Methods
 MethodDefined By
 Inherited
This method is called after class initialization.
TouchContainerFactory
 Inherited
This method is called after class initialization.
TouchContainerFactory
  
enableDrag(enable:Boolean = true):void
Album
  
inBounds(e:*):void
Enables the drag if the touch is inside or moves inside the album
Album
  
outOfBounds(e:*):void
Disables the drag if the touch moves outside of the album
Album
 Inherited
randomMinMax(min:Number, max:Number):Number
This method is called after class initialization.
TouchContainerFactory
 Inherited
This method is called after class initialization.
TouchContainerFactory
  
Drag the belt horizontally within the boundaries.
Album
  
Drag the belt vertically within the boundaries.
Album
 Inherited
thumbUpdate(event:Event):void
This method is called after class initialization.
TouchContainerFactory
Property Detail
applyMaskproperty
applyMask:Boolean

Flag indicating whether the contents are masked

The default value is true.


Implementation
    public function get applyMask():Boolean
    public function set applyMask(value:Boolean):void
backgroundColorproperty 
backgroundColor:uint

The color of the album's background


Implementation
    public function get backgroundColor():uint
    public function set backgroundColor(value:uint):void
beltproperty 
belt:TouchContainer  [read-only]

The primary container and interactive object


Implementation
    public function get belt():TouchContainer
centerContentproperty 
centerContent:Boolean

Flag indicating the album items should be centered horizontally and vertically

The default value is true.


Implementation
    public function get centerContent():Boolean
    public function set centerContent(value:Boolean):void
clusterBubblingproperty 
clusterBubbling:Boolean[override]

Redirect clusterBubbling setting to the belt


Implementation
    public function get clusterBubbling():Boolean
    public function set clusterBubbling(value:Boolean):void
currentSnapPointproperty 
currentSnapPoint:Number  [read-only]

Returns the index of the current snap point


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

Intended to account for the rotation of the parent object to apply to drag transformations. This value does NOT set the rotation of the AlbumElement. The rotation must be set through the rotation attribute(s).


Implementation
    public function get dragAngle():Number
    public function set dragAngle(value:Number):void
dragGestureproperty 
dragGesture:String

Specifies the GML drag gesture of the belt (e.g. n-drag, 2-finger-drag, etc.).

The default value is n-drag-inertia.


Implementation
    public function get dragGesture():String
    public function set dragGesture(value:String):void
heightproperty 
height:Number[override]

Sets the height of the container and associated mask


Implementation
    public function get height():Number
    public function set height(value:Number):void
horizontalproperty 
horizontal:Boolean

Flag indicating the scroll axis

The default value is true.


Implementation
    public function get horizontal():Boolean
    public function set horizontal(value:Boolean):void
layoutproperty 
layout:*[override]

The album element is intended for a ListLayout only. The layout axis can be set by the "horizontal" attribute and the spacing can be adjusted through the "margin" attribute.


Implementation
    public function get layout():*
    public function set layout(value:any):void
loopproperty 
loop:Boolean

A flag instructing the album to continuously cycle through the objects opposed to stopping at the beginning or end. The album must have more than one child to set this flag.


Implementation
    public function get loop():Boolean
    public function set loop(value:Boolean):void
loopQueueproperty 
loopQueue:Array  [read-only]

The queue storing the order of children in the loop from head to tail


Implementation
    public function get loopQueue():Array
marginproperty 
margin:Number

Sets the margin between the child display objects

The default value is 1.


Implementation
    public function get margin():Number
    public function set margin(value:Number):void
mouseChildrenproperty 
mouseChildren:Boolean[override]

Redirect mouseChidren setting to the belt


Implementation
    public function get mouseChildren():Boolean
    public function set mouseChildren(value:Boolean):void
rotationproperty 
rotation:Number  [write-only] [override]

Synchronize the drag angle with the album's rotation


Implementation
    public function set rotation(value:Number):void
rotationXproperty 
rotationX:Number  [write-only] [override]

Synchronize the drag angle with the album's rotation


Implementation
    public function set rotationX(value:Number):void
rotationYproperty 
rotationY:Number  [write-only] [override]

Synchronize the drag angle with the album's rotation


Implementation
    public function set rotationY(value:Number):void
snappingproperty 
snapping:Boolean

A flag indicating the snap animation of the objects into place


Implementation
    public function get snapping():Boolean
    public function set snapping(value:Boolean):void
widthproperty 
width:Number[override]

Sets the width of the container and associated mask


Implementation
    public function get width():Number
    public function set width(value:Number):void
Constructor Detail
Album()Constructor
public function Album()

Constructor

Method Detail
addChild()method
override public function addChild(child:DisplayObject):DisplayObject

Reroutes the addition of children from the album to the album's belt and sets the dimesions of the container based on the greatest width and height of the child dimensions. If clusterBubbling is enabled, the children are wrapped in a TouchSprite to enable interactivity.

Parameters

child:DisplayObject

Returns
DisplayObject
addChildAt()method 
override public function addChildAt(child:DisplayObject, index:int):DisplayObject

Reroutes the addition of children from the album to the album's belt and sets the dimesions of the container based on the greatest width and height of the child dimensions. If clusterBubbling is enabled, the children are wrapped in a TouchSprite to enable interactivity.

Parameters

child:DisplayObject
 
index:int

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

The album element is intended for a ListLayout only. The layout axis can be set by the "horizontal" attribute and the spacing can be adjusted through the "margin" attribute.

Parameters

value:* (default = null)

clear()method 
public function clear():void

Removes belt children and resets initial album states

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

CML initialization

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

Destructor

enableDrag()method 
protected function enableDrag(enable:Boolean = true):void

Parameters

enable:Boolean (default = true)

inBounds()method 
protected function inBounds(e:*):void

Enables the drag if the touch is inside or moves inside the album

Parameters

e:*

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

Initialization function

next()method 
public function next():void

Snap to the next item on the belt

objectAtSnapPoint()method 
public function objectAtSnapPoint(point:int):*

Returns the object at the current stap point

Parameters

point:int

Returns
*
outOfBounds()method 
protected function outOfBounds(e:*):void

Disables the drag if the touch moves outside of the album

Parameters

e:*

previous()method 
public function previous():void

Snap to the previous item on the belt

reset()method 
public function reset():void

scrollH()method 
protected function scrollH(e:GWGestureEvent):void

Drag the belt horizontally within the boundaries. If boundaries are exceeded and the belt is not being touched, the drag is disabled and the belt snaps into place.

Parameters

e:GWGestureEvent — the drag event

scrollV()method 
protected function scrollV(e:GWGestureEvent):void

Drag the belt vertically within the boundaries. If boundaries are exceeded and the belt is not being touched, the drag is disabled and the belt snaps into place.

Parameters

e:GWGestureEvent — the drag event

snapTo()method 
public function snapTo(num:Number):void

Parameters

num:Number

updateState()method 
public function updateState(album:Album):void

Intended to synchronize this album with another's state when album linking through the AlbumViewer.

Parameters

album:Album — the album to synch to