Package | com.boostworthy.animation.sequence |
Class | public class Timeline |
Inheritance | Timeline ![]() |
Implements | IDisposable |
Property | Defined by | ||
---|---|---|---|
length : Number [read-only]
Returns the length (in frames) of this timeline.
| Timeline | ||
loop : Boolean
Gets the current loop setting.
| Timeline |
Property | Defined by | ||
---|---|---|---|
m_bLoop : Boolean
Determines whether or not this timeline loops when the last frame is finished.
| Timeline | ||
m_nRefreshRate : Number
The necessary refresh rate to achieve the desired frame rate.
| Timeline | ||
m_objRendererNext : Renderer
Holds an instance of the renderer object for rendering playback forwards.
| Timeline | ||
m_objRendererPrev : Renderer
Holds an instance of the renderer object for rendering playback in reverse.
| Timeline | ||
m_objTweenStack : TweenStack
A stack for storing all tweens in this timeline.
| Timeline | ||
m_uFrame : uint
The current frame the playhead of this timeline is at.
| Timeline | ||
m_uFrameRate : uint
The frame rate for this timeline to play at.
| Timeline | ||
m_uLength : uint
The length (in frames) of this timeline.
| Timeline | ||
m_uRenderMethod : uint
Stores the render method being used to render this object's tweens.
| Timeline |
Method | Defined by | ||
---|---|---|---|
Timeline(uRenderMethod:uint, nFrameRate:Number)
Constructor.
| Timeline | ||
Adds a new tween to this timeline.
| Timeline | ||
dispose():void
Performs any appropriate clean-up tasks for garbage collection such as
removing event listeners, setting object references to 'null', etc.
| Timeline | ||
gotoAndPlay(uFrame:uint):void
Moves the playhead to the desired frame and then plays from there.
| Timeline | ||
gotoAndPlayReverse(uFrame:uint):void
Moves the playhead to the desired frame and then plays in reverse from there.
| Timeline | ||
gotoAndStop(uFrame:uint):void
Moves the playhead to the desired frame and then stops.
| Timeline | ||
nextFrame():void
Move the playhead forwards one frame.
| Timeline | ||
play():void
Plays this timeline from the current frame.
| Timeline | ||
playReverse():void
Plays this timeline in reverse from the current frame.
| Timeline | ||
prevFrame():void
Move the playhead backwards one frame.
| Timeline | ||
setFrameRate(nFrameRate:Number):void
Sets the frame rate this timeline plays at.
| Timeline | ||
stop():void
Stops this timeline at the current frame.
| Timeline |
Method | Defined by | ||
---|---|---|---|
computeFrameData(uFirstFrame:uint, uLastFrame:uint):void
Computes the necessary frame data for each tween.
| Timeline | ||
init(uRenderMethod:uint, nFrameRate:Number):void
Initializes this object.
| Timeline | ||
onNextFrameEF(objEvent:Event):void
Called by the renderer when playing forwards using the 'RenderMethod.ENTER_FRAME' render method.
| Timeline | ||
onNextFrameT(objEvent:TimerEvent):void
Called by the renderer when playing forwards using the 'RenderMethod.TIMER' render method.
| Timeline | ||
onPrevFrameEF(objEvent:Event):void
Called by the renderer when playing in reverse using the 'RenderMethod.ENTER_FRAME' render method.
| Timeline | ||
onPrevFrameT(objEvent:TimerEvent):void
Called by the renderer when playing in reverse using the 'RenderMethod.TIMER' render method.
| Timeline | ||
render(bIsReverse:Boolean = false):void
Loops through the tween stack and renders the current frame of each tween.
| Timeline | ||
setFrame(uFrame:Number):void
Sets the current frame of the playhead.
| Timeline |
Event | Summary | Defined by | ||
---|---|---|---|---|
Dispatched when an animation changes. | Timeline | |||
Dispatched when an animation is finished. | Timeline | |||
Dispatched when an animation starts. | Timeline | |||
Dispatched when an animation stops. | Timeline |
Constant | Defined by | ||
---|---|---|---|
DEFAULT_FRAME_RATE : Number = 60
Configures the default frame rate for timelines.
| Timeline | ||
DEFAULT_LOOP : Boolean = false
Configures the default loop setting.
| Timeline | ||
DEFAULT_RENDER_METHOD : uint = 2
Configures the default render method to use for rendering tweens.
| Timeline |
length | property |
length:Number
[read-only]Returns the length (in frames) of this timeline.
Implementation public function get length():Number
loop | property |
loop:Boolean
[read-write]Gets the current loop setting.
Implementation public function get loop():Boolean
public function set loop(value:Boolean):void
m_bLoop | property |
protected var m_bLoop:Boolean
Determines whether or not this timeline loops when the last frame is finished.
m_nRefreshRate | property |
protected var m_nRefreshRate:Number
The necessary refresh rate to achieve the desired frame rate.
m_objRendererNext | property |
protected var m_objRendererNext:Renderer
Holds an instance of the renderer object for rendering playback forwards.
m_objRendererPrev | property |
protected var m_objRendererPrev:Renderer
Holds an instance of the renderer object for rendering playback in reverse.
m_objTweenStack | property |
protected var m_objTweenStack:TweenStack
A stack for storing all tweens in this timeline.
m_uFrame | property |
protected var m_uFrame:uint
The current frame the playhead of this timeline is at.
m_uFrameRate | property |
protected var m_uFrameRate:uint
The frame rate for this timeline to play at.
m_uLength | property |
protected var m_uLength:uint
The length (in frames) of this timeline.
m_uRenderMethod | property |
protected var m_uRenderMethod:uint
Stores the render method being used to render this object's tweens.
Timeline | () | constructor |
public function Timeline(uRenderMethod:uint, nFrameRate:Number)
Constructor.
ParametersuRenderMethod:uint — The render method to use for rendering tweens.
|
|
nFrameRate:Number — The frame rate for the timeline to play at. This is only used if 'RenderMethod.TIMER' is used as the render method.
|
See also
addTween | () | method |
public function addTween(objTween:ITween):void
Adds a new tween to this timeline.
ParametersobjTween:ITween — The tween to add to this timeline.
|
computeFrameData | () | method |
protected function computeFrameData(uFirstFrame:uint, uLastFrame:uint):void
Computes the necessary frame data for each tween.
ParametersuFirstFrame:uint — The first frame to compute.
|
|
uLastFrame:uint — The last frame to compute.
|
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.
gotoAndPlay | () | method |
public function gotoAndPlay(uFrame:uint):void
Moves the playhead to the desired frame and then plays from there.
ParametersuFrame:uint — The frame to move the playhead to.
|
gotoAndPlayReverse | () | method |
public function gotoAndPlayReverse(uFrame:uint):void
Moves the playhead to the desired frame and then plays in reverse from there.
ParametersuFrame:uint — The frame to move the playhead to.
|
gotoAndStop | () | method |
public function gotoAndStop(uFrame:uint):void
Moves the playhead to the desired frame and then stops.
ParametersuFrame:uint — The frame to move the playhead to.
|
init | () | method |
protected function init(uRenderMethod:uint, nFrameRate:Number):void
Initializes this object.
ParametersuRenderMethod:uint — The render method to use for rendering tweens.
|
|
nFrameRate:Number — The frame rate for the timeline to play at. This is only used if 'RenderMethod.TIMER' is used as the render method.
|
See also
nextFrame | () | method |
public function nextFrame():void
Move the playhead forwards one frame.
onNextFrameEF | () | method |
protected function onNextFrameEF(objEvent:Event):void
Called by the renderer when playing forwards using the 'RenderMethod.ENTER_FRAME' render method.
ParametersobjEvent:Event — An object containing information about the enter frame event.
|
See also
onNextFrameT | () | method |
protected function onNextFrameT(objEvent:TimerEvent):void
Called by the renderer when playing forwards using the 'RenderMethod.TIMER' render method.
ParametersobjEvent:TimerEvent — An object containing information about the timer event.
|
See also
onPrevFrameEF | () | method |
protected function onPrevFrameEF(objEvent:Event):void
Called by the renderer when playing in reverse using the 'RenderMethod.ENTER_FRAME' render method.
ParametersobjEvent:Event — An object containing information about the enter frame event.
|
See also
onPrevFrameT | () | method |
protected function onPrevFrameT(objEvent:TimerEvent):void
Called by the renderer when playing in reverse using the 'RenderMethod.TIMER' render method.
ParametersobjEvent:TimerEvent — An object containing information about the timer event.
|
See also
play | () | method |
public function play():void
Plays this timeline from the current frame.
playReverse | () | method |
public function playReverse():void
Plays this timeline in reverse from the current frame.
prevFrame | () | method |
public function prevFrame():void
Move the playhead backwards one frame.
render | () | method |
protected function render(bIsReverse:Boolean = false):void
Loops through the tween stack and renders the current frame of each tween.
ParametersbIsReverse:Boolean (default = false ) — A parameter which will force the stack to be rendered in reverse if necessary.
|
setFrame | () | method |
protected function setFrame(uFrame:Number):void
Sets the current frame of the playhead.
ParametersuFrame:Number — The frame to move the playhead to.
|
setFrameRate | () | method |
public function setFrameRate(nFrameRate:Number):void
Sets the frame rate this timeline plays at.
ParametersnFrameRate:Number — The frame rate for the timeline to play at.
|
stop | () | method |
public function stop():void
Stops this timeline at the current frame.
animationChange | event |
animationFinish | event |
animationStart | event |
animationStop | event |
DEFAULT_FRAME_RATE | constant |
protected const DEFAULT_FRAME_RATE:Number = 60
Configures the default frame rate for timelines. This is only used if the render method is 'RenderMethod.TIMER'. 'RenderMethod.ENTER_FRAME' uses the SWF file's frame rate.
See also
DEFAULT_LOOP | constant |
protected const DEFAULT_LOOP:Boolean = false
Configures the default loop setting.
DEFAULT_RENDER_METHOD | constant |
protected const DEFAULT_RENDER_METHOD:uint = 2
Configures the default render method to use for rendering tweens.
The default value '2' is RenderMethod.TIMER. This is done because the 'RenderMethod' class is not available at the time this is compiled.
See also