Packagecom.boostworthy.animation.management
Classpublic class Buffer
InheritanceBuffer Inheritance flash.events.EventDispatcher
ImplementsICollection, IDisposable, IRenderable

The 'Buffer' class manages a collection of animations to be rendered at the same time.

See also

com.boostworthy.collections.Collection_I


Public Properties
 PropertyDefined by
  length : uint
[read-only] Gets the number of items in this buffer.
Buffer
Protected Properties
 PropertyDefined by
  m_objQueue : Queue
A queue for storing animation objects.
Buffer
Public Methods
 MethodDefined by
  
Constructor.
Buffer
  
add(objAnimation:IAnimation):void
Adds a new animation to the buffer.
Buffer
  
clear():void
Clears all animations from the buffer.
Buffer
  
dispose():void
Performs any appropriate clean-up tasks for garbage collection such as removing event listeners, setting object references to 'null', etc.
Buffer
  
getIterator(uIterator:uint = 2):IIterator
Returns an iterator of the specified type.
Buffer
  
remove(objAnimation:IAnimation):void
Removes the specified animation from the buffer.
Buffer
  
removeByProperty(objTarget:Object, strProperty:String):void
Removes all animations involving the target object and it's specified property from the buffer.
Buffer
  
removeByTarget(objTarget:Object):void
Removes all animations involving the target object from the buffer.
Buffer
  
render():Boolean
Iterates through the contents of this buffer and renders each animation.
Buffer
Protected Methods
 MethodDefined by
  
init():void
Initializes this object.
Buffer
  
removeElement(objElement:IAnimation):void
Removes an element from the queue.
Buffer
Events
 EventSummaryDefined by
   Dispatched when an animation changes.Buffer
   Dispatched when an animation is finished.Buffer
   Dispatched when an animation stops.Buffer
Property detail
lengthproperty
length:uint  [read-only]

Gets the number of items in this buffer.

Implementation
    public function get length():uint
m_objQueueproperty 
protected var m_objQueue:Queue

A queue for storing animation objects.

Constructor detail
Buffer()constructor
public function Buffer()

Constructor.

Method detail
add()method
public function add(objAnimation:IAnimation):void

Adds a new animation to the buffer.

Parameters
objAnimation:IAnimation — The aniamtion to be added to the buffer.
clear()method 
public function clear():void

Clears all animations from the buffer.

dispose()method 
public function dispose():void

Performs any appropriate clean-up tasks for garbage collection such as removing event listeners, setting object references to 'null', etc.

getIterator()method 
public function getIterator(uIterator:uint = 2):IIterator

Returns an iterator of the specified type.

Parameters
uIterator:uint (default = 2) — The iterator type to use for iterating through the data being stored by this collection. Default is '2' (IteratorType.ARRAY_FORWARD).

Returns
IIterator — An iterator instance of the specified type.

See also

init()method 
protected function init():void

Initializes this object.

remove()method 
public function remove(objAnimation:IAnimation):void

Removes the specified animation from the buffer.

Parameters
objAnimation:IAnimation — The animation to be removed.
removeByProperty()method 
public function removeByProperty(objTarget:Object, strProperty:String):void

Removes all animations involving the target object and it's specified property from the buffer.

Parameters
objTarget:Object — The target object whose animations are to be removed.
 
strProperty:String — The target object's property being searched for.
removeByTarget()method 
public function removeByTarget(objTarget:Object):void

Removes all animations involving the target object from the buffer.

Parameters
objTarget:Object — The target object whose animations are to be removed.
removeElement()method 
protected function removeElement(objElement:IAnimation):void

Removes an element from the queue.

Parameters
objElement:IAnimation — The element to be removed from the queue.
render()method 
public function render():Boolean

Iterates through the contents of this buffer and renders each animation.

Returns
Boolean
Event detail
animationChangeevent 
Event object type: com.boostworthy.events.AnimationEvent

Dispatched when an animation changes.

animationFinishevent  
Event object type: com.boostworthy.events.AnimationEvent

Dispatched when an animation is finished.

animationStopevent  
Event object type: com.boostworthy.events.AnimationEvent

Dispatched when an animation stops.