Renderer

EventDispatcher
Renderer

The ‘Renderer’ class is essentially a wrapper API around the different render methods.  You can use it to routinely call methods using the enter frame event or a timer event.

See Also

com.boostworthy.animation.RenderMethod

Summary
RendererThe ‘Renderer’ class is essentially a wrapper API around the different render methods.
Variables
m_fncOnEnterFrameHolds a reference to the enter frame event handler.
m_objTimerHolds a timer instance to be used by this renderer.
m_fncOnTimerHolds a reference to the timer event handler.
m_objStageHolds a reference to the stage to be used for adding/removing listeners to the enter frame event.
Functions
RendererConstructor.
startStarts rendering for the specified render method.
stopStops rendering for the specified render method.
startAllStarts rendering for all render methods.
stopAllStops rendering for all render methods.
disposePerforms any appropriate clean-up tasks for garbage collection such as removing event listeners, setting object references to ‘null’, etc.
startEnterFrameStarts listening for the enter frame event.
stopEnterFrameStops listening for the enter frame event.
startTimerStarts the timer.
stopTimerStops the timer.
setRefreshRateSets the refresh rate of this renderer if it is Timer driven.

Variables

m_fncOnEnterFrame

protected var m_fncOnEnterFrame: Function

Holds a reference to the enter frame event handler.

m_objTimer

protected var m_objTimer: Timer

Holds a timer instance to be used by this renderer.

m_fncOnTimer

protected var m_fncOnTimer: Function

Holds a reference to the timer event handler.

m_objStage

protected var m_objStage: Stage

Holds a reference to the stage to be used for adding/removing listeners to the enter frame event.

Functions

Renderer

public function Renderer(fncOnEnterFrame: Function,
fncOnTimer: Function,
nRefreshRate: Number)

Constructor.

Parameters

param fncOnEnterFrame A reference to the event handler for the enter frame event.
param fncOnTimer A reference to the event handler for the timer event.
param nRefreshRate This interval for the timer to be set at.  The value is in milliseconds. 

start

public function start(nRenderMethod: Number):void

Starts rendering for the specified render method.

Parameters

param nRenderMethod The method to start rendering for. 

See Also

com.boostworthy.animation.rendering.RenderMethod

stop

public function stop(nRenderMethod: Number):void

Stops rendering for the specified render method.

Parameters

param nRenderMethod The method to stop rendering for. 

See Also

com.boostworthy.animation.rendering.RenderMethod

startAll

public function startAll():void

Starts rendering for all render methods.

stopAll

public function stopAll():void

Stops rendering for all render methods.

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.

startEnterFrame

protected function startEnterFrame():void

Starts listening for the enter frame event.

stopEnterFrame

protected function stopEnterFrame():void

Stops listening for the enter frame event.

startTimer

protected function startTimer():void

Starts the timer.

stopTimer

protected function stopTimer():void

Stops the timer.

setRefreshRate

public function setRefreshRate(nRefreshRate: Number):void

Sets the refresh rate of this renderer if it is Timer driven.

Parameters

param nRefreshRate The delay between frames in milliseconds. 
The ‘IDisposable’ interface defines a common interface for all objects to encorporate garbage collection.
protected var m_fncOnEnterFrame: Function
Holds a reference to the enter frame event handler.
protected var m_objTimer: Timer
Holds a timer instance to be used by this renderer.
protected var m_fncOnTimer: Function
Holds a reference to the timer event handler.
protected var m_objStage: Stage
Holds a reference to the stage to be used for adding/removing listeners to the enter frame event.
public function Renderer(fncOnEnterFrame: Function,
fncOnTimer: Function,
nRefreshRate: Number)
Constructor.
public function start(nRenderMethod: Number):void
Starts rendering for the specified render method.
public function stop(nRenderMethod: Number):void
Stops rendering for the specified render method.
public function startAll():void
Starts rendering for all render methods.
public function stopAll():void
Stops rendering for all render methods.
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 startEnterFrame():void
Starts listening for the enter frame event.
protected function stopEnterFrame():void
Stops listening for the enter frame event.
protected function startTimer():void
Starts the timer.
protected function stopTimer():void
Stops the timer.
public function setRefreshRate(nRefreshRate: Number):void
Sets the refresh rate of this renderer if it is Timer driven.
Close