Buffer

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

See Also

com.boostworthy.collections.Collection_I

Summary
BufferThe ‘Buffer’ class manages a collection of animations to be rendered at the same time.
Variables
m_objQueueA queue for storing animation objects.
Functions
BufferConstructor.
addAdds a new animation to the buffer.
removeRemoves the specified animation from the buffer.
removeByTargetRemoves all animations involving the target object from the buffer.
removeByPropertyRemoves all animations involving the target object and it’s specified property from the buffer.
renderIterates through the contents of this buffer and renders each animation.
clearClears all animations from the buffer.
Properties
lengthGets the number of items in this buffer.
Functions
getIteratorReturns an iterator of the specified type.
disposePerforms any appropriate clean-up tasks for garbage collection such as removing event listeners, setting object references to ‘null’, etc.
initInitializes this object.
removeElementRemoves an element from the queue.

Variables

m_objQueue

protected var m_objQueue: Queue

A queue for storing animation objects.

Functions

Buffer

public function Buffer()

Constructor.

add

public function add(objAnimation: IAnimation):void

Adds a new animation to the buffer.

Parameters

param objAnimation The aniamtion to be added to the buffer. 

remove

public function remove(objAnimation: IAnimation):void

Removes the specified animation from the buffer.

Parameters

param objAnimation The animation to be removed. 

removeByTarget

public function removeByTarget(objTarget: Object):void

Removes all animations involving the target object from the buffer.

Parameters

param objTarget The target object whose animations are to be removed. 

removeByProperty

public function removeByProperty(objTarget: Object,
strProperty: String):void

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

Parameters

param objTarget The target object whose animations are to be removed.
param strProperty The target object’s property being searched for. 

render

public function render():Boolean

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

clear

public function clear():void

Clears all animations from the buffer.

Properties

length

public function get length():uint

Gets the number of items in this buffer.

Returns

The number of items in this buffer. 

Functions

getIterator

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

Returns an iterator of the specified type.

Parameters

param uIterator The iterator type to use for iterating through the data being stored by this collection.  Default is ‘2’ (IteratorType.ARRAY_FORWARD). 

Returns

An iterator instance of the specified type. 

See Also

com.boostworthy.collections.iterators.IteratorType

dispose

public function dispose():void

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

init

protected function init():void

Initializes this object.

removeElement

protected function removeElement(objElement: IAnimation):void

Removes an element from the queue.

Parameters

param objElement The element to be removed from the queue. 
The ‘ICollection’ interface defines a common interface for all collection objects.
The ‘IDisposable’ interface defines a common interface for all objects to encorporate garbage collection.
The ‘IRenderable’ interface defines a common interface for all renderable objects.
protected var m_objQueue: Queue
A queue for storing animation objects.
public function Buffer()
Constructor.
public function add(objAnimation: IAnimation):void
Adds a new animation to the buffer.
public function remove(objAnimation: IAnimation):void
Removes the specified animation from the buffer.
public function removeByTarget(objTarget: Object):void
Removes all animations involving the target object from the buffer.
public function removeByProperty(objTarget: Object,
strProperty: String):void
Removes all animations involving the target object and it’s specified property from the buffer.
public function render():Boolean
Iterates through the contents of this buffer and renders each animation.
public function clear():void
Clears all animations from the buffer.
public function get length():uint
Gets the number of items in this buffer.
public function getIterator(uIterator: uint = 2):IIterator
Returns an iterator of the specified type.
public function dispose():void
Performs any appropriate clean-up tasks for garbage collection such as removing event listeners, setting object references to ‘null’, etc.
protected function init():void
Initializes this object.
protected function removeElement(objElement: IAnimation):void
Removes an element from the queue.
Close