Packagecom.boostworthy.animation.management
Classpublic class Framebuffer
InheritanceFramebuffer Inheritance flash.events.EventDispatcher
ImplementsIDisposable

The 'Framebuffer' class works with buffers and a renderer to handle the process of rendering multiple animations at the same time.

See also

com.boostworthy.animation.management.Buffer
com.boostworthy.animation.rendering.Renderer


Protected Properties
 PropertyDefined by
  m_objBufferEF : Buffer
Holds all animation objects to be rendered on enter frame.
Framebuffer
  m_objBufferT : Buffer
Holds all animation objects to be rendered on timer.
Framebuffer
  m_objRenderer : Renderer
The renderer instance to be used to render the contents of the buffers.
Framebuffer
Public Methods
 MethodDefined by
  
Framebuffer(nRefreshRate:Number)
Constructor.
Framebuffer
  
addBufferObject(objAnimation:IAnimation):void
Adds a new animation to the framebuffer.
Framebuffer
  
clearBuffer():void
Clears all animations from the buffers.
Framebuffer
  
dispose():void
Performs any appropriate clean-up tasks for garbage collection such as removing event listeners, setting object references to 'null', etc.
Framebuffer
  
removeBufferObject(objTarget:Object):void
Removes all animations involving the target object from the framebuffer.
Framebuffer
Protected Methods
 MethodDefined by
  
Checks the enter frame buffer to see if it is empty.
Framebuffer
  
Checks the timer buffer to see if it is empty.
Framebuffer
  
init(nRefreshRate:Number):void
Initializes this object.
Framebuffer
  
Called when an animation changes.
Framebuffer
  
Called when an animation finishes.
Framebuffer
  
Called when an animation starts.
Framebuffer
  
Called when an animation stops.
Framebuffer
  
onRenderEF(objEvent:Event):void
Event handler for the enter frame event.
Framebuffer
  
onRenderT(objEvent:TimerEvent):void
Event handler for the timer event.
Framebuffer
  
removeAnimation(objAnimation:IAnimation):void
Removes the specified animation from the buffer.
Framebuffer
  
removeAnimationByObject(objTarget:Object):void
Removes all animations involving the target object from the framebuffer.
Framebuffer
  
removeAnimationByProperty(objTarget:Object, strProperty:String):void
Removes all animations involving the target object's property from the framebuffer.
Framebuffer
Events
 EventSummaryDefined by
   Dispatched when an animation changes.Framebuffer
   Dispatched when an animation is finished.Framebuffer
   Dispatched when an animation starts.Framebuffer
   Dispatched when an animation stops.Framebuffer
Property detail
m_objBufferEFproperty
protected var m_objBufferEF:Buffer

Holds all animation objects to be rendered on enter frame.

See also

m_objBufferTproperty 
protected var m_objBufferT:Buffer

Holds all animation objects to be rendered on timer.

See also

m_objRendererproperty 
protected var m_objRenderer:Renderer

The renderer instance to be used to render the contents of the buffers.

See also

Constructor detail
Framebuffer()constructor
public function Framebuffer(nRefreshRate:Number)

Constructor.

Parameters
nRefreshRate:Number — This rate in which animations being rendered using the 'RenderMethod.TIMER' method will be refreshed. The value is in milliseconds.

See also

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

Adds a new animation to the framebuffer.

Parameters
objAnimation:IAnimation — The aniamtion to be added to the framebuffer.
checkBufferLengthEF()method 
protected function checkBufferLengthEF():void

Checks the enter frame buffer to see if it is empty. If it is, enter frame rendering is stopped.

checkBufferLengthT()method 
protected function checkBufferLengthT():void

Checks the timer buffer to see if it is empty. If it is, timer rendering is stopped.

clearBuffer()method 
public function clearBuffer():void

Clears all animations from the buffers.

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.

init()method 
protected function init(nRefreshRate:Number):void

Initializes this object.

Parameters
nRefreshRate:Number — This rate in which animations being rendered using the 'RenderMethod.TIMER' method will be refreshed. The value is in milliseconds.

See also

onAnimationChange()method 
protected function onAnimationChange(objEvent:AnimationEvent):void

Called when an animation changes.

Parameters
objEvent:AnimationEvent — An object containing information about the animation event.
onAnimationFinish()method 
protected function onAnimationFinish(objEvent:AnimationEvent):void

Called when an animation finishes.

Parameters
objEvent:AnimationEvent — An object containing information about the animation event.
onAnimationStart()method 
protected function onAnimationStart(objEvent:AnimationEvent):void

Called when an animation starts.

Parameters
objEvent:AnimationEvent — An object containing information about the animation event.
onAnimationStop()method 
protected function onAnimationStop(objEvent:AnimationEvent):void

Called when an animation stops.

Parameters
objEvent:AnimationEvent — An object containing information about the animation event.
onRenderEF()method 
protected function onRenderEF(objEvent:Event):void

Event handler for the enter frame event. Loops through the contents of the buffer and updates each animation.

Parameters
objEvent:Event — An object containing information about the event.
onRenderT()method 
protected function onRenderT(objEvent:TimerEvent):void

Event handler for the timer event.

Loops through the contents of the buffer and updates each animation. Parameters

objEvent:TimerEvent — An object containing information about the event.
removeAnimation()method 
protected function removeAnimation(objAnimation:IAnimation):void

Removes the specified animation from the buffer.

Parameters
objAnimation:IAnimation — The animation to be removed from the buffer.
removeAnimationByObject()method 
protected function removeAnimationByObject(objTarget:Object):void

Removes all animations involving the target object from the framebuffer.

Parameters
objTarget:Object — The object whose animations are to be removed.
removeAnimationByProperty()method 
protected function removeAnimationByProperty(objTarget:Object, strProperty:String):void

Removes all animations involving the target object's property from the framebuffer.

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

Removes all animations involving the target object from the framebuffer.

Parameters
objTarget:Object — The object whose animations are to be removed.
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.

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

Dispatched when an animation starts.

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

Dispatched when an animation stops.