Package | com.gestureworks.cml.elements |
Class | public class Album |
Inheritance | Album ![]() ![]() |
Subclasses | MenuAlbum |
// 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
Property | Defined By | ||
---|---|---|---|
applyMask : Boolean
Flag indicating whether the contents are masked
| Album | ||
![]() | autoShuffle : Boolean
autoshuffles
| TouchContainer | |
backgroundAlpha : Number
The alpha of the ablum's background
| Album | ||
backgroundColor : uint
The color of the album's background
| Album | ||
belt : TouchContainer [read-only]
The primary container and interactive object
| Album | ||
centerContent : Boolean
Flag indicating the album items should be centered horizontally and
vertically
| Album | ||
![]() | 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 | |
clusterBubbling : Boolean [override] [write-only]
Redirect clusterBubbling setting to the belt
| Album | ||
![]() | cmlIndex : int
Returns the index created by the CML parser. | TouchContainer | |
currentIndex : Number [read-only]
Returns the index of the current snap point
| Album | ||
currentObject : * [read-only]
Returns the current object
| Album | ||
![]() | dimensionsTo : Object
Sets the dimensions of TouchContainer to given object
| TouchContainer | |
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 | ||
![]() | dropShadow : Boolean
Sets the drop shadow effect
| TouchContainer | |
flickGesture : String
Specifies the GML flick gesture (e.g. | Album | ||
![]() | group : String | TouchContainer | |
height : Number [override]
Sets the height of the container and associated mask
| Album | ||
![]() | heightPercent : Number
sets the height of the container
| TouchContainer | |
horizontal : Boolean
Flag indicating the scroll axis
| Album | ||
![]() | id : String
Returns the object's id. | TouchContainer | |
layout : * [override]
The album element is intended for a ListLayout only. | Album | ||
![]() | layoutList : Dictionary | 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 | ||
mouseChildren : Boolean [override]
Redirect mouseChidren setting to the belt
| Album | ||
![]() | 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 | |
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 | ||
snapOffset : Number
The offset from the album's origin to snap the belt to. | Album | ||
snapping : Boolean
A flag indicating the snap animation of the objects into place
| Album | ||
![]() | 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 and associated mask
| Album | ||
![]() | widthPercent : Number
sets the width of the container
| TouchContainer |
Method | Defined By | ||
---|---|---|---|
Album()
Constructor
| Album | ||
![]() | activateTouch():void | TouchContainer | |
![]() | addAllChildren():void
method searches the child and adds to the list
| TouchContainer | |
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 | ||
applyLayout(value:* = null):void [override]
The album element is intended for a ListLayout only. | Album | ||
![]() | childToList(id:String, child:*):void
child appended to the childlist
| TouchContainer | |
clear():void
Removes belt children and resets initial album states
| Album | ||
![]() | clone():*
Clone method
| TouchContainer | |
dispose():void [override]
Destructor
| Album | ||
![]() | 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
| Album | ||
![]() | loadState(sId:* = null, recursion:Boolean = false):void
Loads state by index number. | TouchContainer | |
![]() | makeGestureList(value:XMLList):Object
Creates gestureList object from XML
| TouchContainer | |
next(tween:Boolean = true):void
Snap to the next item on the belt
| Album | ||
objectAtSnapPoint(point:int):*
Returns the object at the current stap point
| Album | ||
![]() | 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 | |
previous(tween:Boolean = true):void
Snap to the previous item on the belt
| Album | ||
![]() | 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
Reset to initial state
| Album | ||
![]() | 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 | |
snapTo(num:Number, tween:Boolean = true):void
Snap to a specific child index
| Album | ||
![]() | 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 | |
updateState(album:Album):void
Intended to synchronize this album with another's state when album linking through the AlbumViewer. | Album |
Method | Defined By | ||
---|---|---|---|
enableDrag(enable:Boolean = true):void
Enables/disables drag gesture
| Album | ||
flickSnap(e:GWGestureEvent):void
Snap to next or previous depending on flick direction
| 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 | ||
scrollH(e:GWGestureEvent):void
Drag the belt horizontally within the boundaries. | Album | ||
scrollV(e:GWGestureEvent):void
Drag the belt vertically within the boundaries. | Album |
applyMask | property |
applyMask:Boolean
Flag indicating whether the contents are masked
The default value is true
.
public function get applyMask():Boolean
public function set applyMask(value:Boolean):void
backgroundAlpha | property |
backgroundAlpha:Number
The alpha of the ablum's background
public function get backgroundAlpha():Number
public function set backgroundAlpha(value:Number):void
backgroundColor | property |
backgroundColor:uint
The color of the album's background
public function get backgroundColor():uint
public function set backgroundColor(value:uint):void
belt | property |
belt:TouchContainer
[read-only] The primary container and interactive object
public function get belt():TouchContainer
centerContent | property |
centerContent:Boolean
Flag indicating the album items should be centered horizontally and vertically
The default value is true
.
public function get centerContent():Boolean
public function set centerContent(value:Boolean):void
clusterBubbling | property |
clusterBubbling:Boolean
[write-only] [override] Redirect clusterBubbling setting to the belt
public function set clusterBubbling(value:Boolean):void
currentIndex | property |
currentIndex:Number
[read-only] Returns the index of the current snap point
public function get currentIndex():Number
currentObject | property |
currentObject:*
[read-only] Returns the current object
public function get currentObject():*
dragAngle | property |
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).
public function get dragAngle():Number
public function set dragAngle(value:Number):void
dragGesture | property |
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
.
public function get dragGesture():String
public function set dragGesture(value:String):void
flickGesture | property |
flickGesture:String
Specifies the GML flick gesture (e.g. n-flick, etc.) to execute next a previous calls based on flick direction.
The default value is n-flick
.
public function get flickGesture():String
public function set flickGesture(value:String):void
height | property |
height:Number
[override] Sets the height of the container and associated mask
public function get height():Number
public function set height(value:Number):void
horizontal | property |
horizontal:Boolean
Flag indicating the scroll axis
The default value is true
.
public function get horizontal():Boolean
public function set horizontal(value:Boolean):void
layout | property |
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.
public function get layout():*
public function set layout(value:any):void
loop | property |
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.
public function get loop():Boolean
public function set loop(value:Boolean):void
loopQueue | property |
loopQueue:Array
[read-only] The queue storing the order of children in the loop from head to tail
public function get loopQueue():Array
margin | property |
margin:Number
Sets the margin between the child display objects
The default value is 1
.
public function get margin():Number
public function set margin(value:Number):void
mouseChildren | property |
mouseChildren:Boolean
[override] Redirect mouseChidren setting to the belt
public function get mouseChildren():Boolean
public function set mouseChildren(value:Boolean):void
rotation | property |
rotation:Number
[write-only] [override] Synchronize the drag angle with the album's rotation
public function set rotation(value:Number):void
rotationX | property |
rotationX:Number
[write-only] [override] Synchronize the drag angle with the album's rotation
public function set rotationX(value:Number):void
rotationY | property |
rotationY:Number
[write-only] [override] Synchronize the drag angle with the album's rotation
public function set rotationY(value:Number):void
snapOffset | property |
snapOffset:Number
The offset from the album's origin to snap the belt to.
The default value is 0
.
public function get snapOffset():Number
public function set snapOffset(value:Number):void
snapping | property |
snapping:Boolean
A flag indicating the snap animation of the objects into place
public function get snapping():Boolean
public function set snapping(value:Boolean):void
width | property |
width:Number
[override] Sets the width of the container and associated mask
public function get width():Number
public function set width(value:Number):void
Album | () | Constructor |
public function Album()
Constructor
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 |
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 |
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
dispose | () | method |
override public function dispose():void
Destructor
enableDrag | () | method |
protected function enableDrag(enable:Boolean = true):void
Enables/disables drag gesture
Parameters
enable:Boolean (default = true ) — true to enable false otherwise
|
flickSnap | () | method |
protected function flickSnap(e:GWGestureEvent):void
Snap to next or previous depending on flick direction
Parameters
e:GWGestureEvent |
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(tween:Boolean = true):void
Snap to the next item on the belt
Parameters
tween:Boolean (default = true ) — tween to next item
|
objectAtSnapPoint | () | method |
public function objectAtSnapPoint(point:int):*
Returns the object at the current stap point
Parameters
point:int |
* —
|
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(tween:Boolean = true):void
Snap to the previous item on the belt
Parameters
tween:Boolean (default = true ) — tween to previous item
|
reset | () | method |
public function reset():void
Reset to initial state
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, tween:Boolean = true):void
Snap to a specific child index
Parameters
num:Number — child index
| |
tween:Boolean (default = true ) — tween on snap
|
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
|