TimelineEx

TimelineEx

Extends the Timeline class with methods to get and remove tweens and dispose of the whole timeline.  It also provides access to the properties used to construct the timeline and properties reflecting its current state.

Summary
TimelineExExtends the Timeline class with methods to get and remove tweens and dispose of the whole timeline.
Internal Members
_renderMethodRender method type only used in code generation and display
Object Manipulation
TimelineExSee Timeline constructor
disposeCleans up resources used by this object and extended tweens.
Tween Add, Access & Removal
getTweenAtFinds the tween at the index and returns a reference to it.
removeTweenRemoves the tween from the timeline.
removeTweenAtRemoves the tween from the timeline if one exists at the given index.
Properties
numTweensRead-only count of the number of tweens on the timeline.
currentFrameRead-only number of the current frame.
frameRateGet the frame rate that the timeline is intended to play at.
frameRateSet the frame rate that the timeline is intended to play at.
renderMethodTypeGet the render method used when generating code.
renderMethodTypeSet the render method used when generating code.
Query methods
hasExtendedPropertyTypesDetermines if any extended property tween exists on the timeline.
hasPropertyTypeDetermines if any extended tweens of the type exists on the timeline.
hasPathTweensDetermines if any path tweens exists on the timeline.
hasAdvancedTweensDetermines if any advanced value tweens exists on the timeline.
refreshRefresh the complete timline.

Internal Members

_renderMethod

private var _renderMethod: uint

Render method type only used in code generation and display

Object Manipulation

TimelineEx

public function TimelineEx(renderMethod: uint = DEFAULT_RENDER_METHOD,
frameRate: Number = DEFAULT_FRAME_RATE):void

See Timeline constructor

dispose

public override function dispose():void

Cleans up resources used by this object and extended tweens.

Tween Add, Access & Removal

getTweenAt

public function getTweenAt(index: int):ITween

Finds the tween at the index and returns a reference to it.

Parameters

indextween sequential id

Returns

A reference to a tween object at the given index or null if not found

removeTween

public function removeTween(objTween: ITween):void

Removes the tween from the timeline.  If it is an extended tween then it is disposed first.

Parameters

objTweenReference to tween to remove

removeTweenAt

public function removeTweenAt(index: int):void

Removes the tween from the timeline if one exists at the given index.  An extended tween is disposed first.

Parameters

indextween sequential id

Properties

numTweens

public function get numTweens():uint

Read-only count of the number of tweens on the timeline.

Returns

Count of tweens

currentFrame

public function get currentFrame():uint

Read-only number of the current frame.

Returns

Frame number

frameRate

public function get frameRate():uint

Get the frame rate that the timeline is intended to play at.

Returns

The currently set frame rate

frameRate

public function set frameRate(newFrameRate: uint):void

Set the frame rate that the timeline is intended to play at.

Parameters

The intended frame rate

renderMethodType

public function get renderMethodType():uint

Get the render method used when generating code.

Returns

One of the constants defined in <com.boostworthy.animation.rendering.RenderMethod>

renderMethodType

public function set renderMethodType(newRenderMethodType: uint):void

Set the render method used when generating code.

Parameters

renderMethodTypeOne of the constants defined in <com.boostworthy.animation.rendering.RenderMethod>

Query methods

hasExtendedPropertyTypes

public function hasExtendedPropertyTypes():Boolean

Determines if any extended property tween exists on the timeline.

Returns

True if extended properties are in use, false otherwise

hasPropertyType

public function hasPropertyType(propertyType: String):Boolean

Determines if any extended tweens of the type exists on the timeline.

Parameters

propertyTypeA TweenEx property type constant string

Returns

True if found, false otherwise

hasPathTweens

public function hasPathTweens():Boolean

Determines if any path tweens exists on the timeline.

Returns

True if path tweens are in use, false otherwise

hasAdvancedTweens

public function hasAdvancedTweens():Boolean

Determines if any advanced value tweens exists on the timeline.

Returns

True if advanced tweens are in use, false otherwise

refresh

public function refresh():void

Refresh the complete timline.

Call when objects the timeline has precomputed data for changes such as paths being updated by the user after they were added.

The ‘Timeline’ class simulates the timeline paradox by presenting a similar API to create and control tweens.
private var _renderMethod: uint
Render method type only used in code generation and display
public function TimelineEx(renderMethod: uint = DEFAULT_RENDER_METHOD,
frameRate: Number = DEFAULT_FRAME_RATE):void
See Timeline constructor
public override function dispose():void
Cleans up resources used by this object and extended tweens.
public function getTweenAt(index: int):ITween
Finds the tween at the index and returns a reference to it.
public function removeTween(objTween: ITween):void
Removes the tween from the timeline.
public function removeTweenAt(index: int):void
Removes the tween from the timeline if one exists at the given index.
public function get numTweens():uint
Read-only count of the number of tweens on the timeline.
public function get currentFrame():uint
Read-only number of the current frame.
public function get frameRate():uint
Get the frame rate that the timeline is intended to play at.
public function get renderMethodType():uint
Get the render method used when generating code.
public function hasExtendedPropertyTypes():Boolean
Determines if any extended property tween exists on the timeline.
public function hasPropertyType(propertyType: String):Boolean
Determines if any extended tweens of the type exists on the timeline.
public function hasPathTweens():Boolean
Determines if any path tweens exists on the timeline.
public function hasAdvancedTweens():Boolean
Determines if any advanced value tweens exists on the timeline.
public function refresh():void
Refresh the complete timline.
Close