PathTween

The ‘PathTween’ class tweens a display object along a path.

See Also

com.boostworthy.animation.sequence.tweens.ITween, com.boostworthy.geom.Path

Summary
PathTweenThe ‘PathTween’ class tweens a display object along a path.
Constants
DEFAULT_TRANSITIONThe default transition to use for the tween.
PROPERTYMeta data for representing the property being animated.
Variables
m_objToTweenA reference to the display object to be tweened.
m_objPathThe path the target object is to be animated along.
m_bOrientToPathA value for determining whether or not to orient the object to the paths direction.
m_uFirstFrameThe first frame of the tween.
m_uLastFrameThe last frame of the tween.
m_strTransitionThe name of the transition to be used for the tween.
m_fncTransitionA reference to the transition being used for the tween.
m_bIsDirtyDetermines whether or not this tween has changed and needs compared towards it’s target value again.
m_nStartRotationStores the starting rotational value of the object being tween.
Functions
PathTweenConstructor.
cloneCreates a new path tween object that is a clone of this object.
renderFrameRenders the specified frame.
Properties
firstFrameGets the first frame of the timeline that has a keyframe on it.
lastFrameGets the last frame of the timeline that has a keyframe on it.
targetGets a reference to the target object being tweened.
propertyGets a string of the target property.

Constants

DEFAULT_TRANSITION

protected const DEFAULT_TRANSITION: String

The default transition to use for the tween.

PROPERTY

protected const PROPERTY: String

Meta data for representing the property being animated.

Variables

m_objToTween

protected var m_objToTween: DisplayObject

A reference to the display object to be tweened.

m_objPath

protected var m_objPath: Path

The path the target object is to be animated along.

m_bOrientToPath

protected var m_bOrientToPath: Boolean

A value for determining whether or not to orient the object to the paths direction.

m_uFirstFrame

protected var m_uFirstFrame: uint

The first frame of the tween.

m_uLastFrame

protected var m_uLastFrame: uint

The last frame of the tween.

m_strTransition

protected var m_strTransition: String

The name of the transition to be used for the tween.

m_fncTransition

protected var m_fncTransition: Function

A reference to the transition being used for the tween.

m_bIsDirty

protected var m_bIsDirty: Boolean

Determines whether or not this tween has changed and needs compared towards it’s target value again.

m_nStartRotation

protected var m_nStartRotation: Number

Stores the starting rotational value of the object being tween.

Functions

PathTween

public function PathTween(objToTween: DisplayObject,  
objPath: Path,  
bOrientToPath: Boolean,  
uFirstFrame: uint,  
uLastFrame: uint,  
strTransition: String = DEFAULT_TRANSITION)

Constructor.

Parameters

param objToTween The display object to be tweened.
param objPath The path the target object is to be animated along.
param bOrientToPath Determines whether or not to orient the object to the paths direction.
param uFirstFrame The first frame of the tween.
param uLastFrame The last frame of the tween.
param strTransition The name of the transition to be used for the tween. 

See Also

com.boostworthy.animation.easing.Transitions, com.boostworthy.geom.Path

clone

public function clone():ITween

Creates a new path tween object that is a clone of this object.

Returns

A new path tween object. 

renderFrame

public function renderFrame(uFrame: uint):void

Renders the specified frame.

Parameters

param uFrame The frame to render. 

Properties

firstFrame

public function get firstFrame():uint

Gets the first frame of the timeline that has a keyframe on it.

Returns

The first frame of the timeline that has a keyframe on it. 

lastFrame

public function get lastFrame():uint

Gets the last frame of the timeline that has a keyframe on it.

Returns

The last frame of the timeline that has a keyframe on it. 

target

public function get target():Object

Gets a reference to the target object being tweened.

Returns

A reference to the target object being tweened. 

property

public function get property():String

Gets a string of the target property.

Returns

A string of the target property. 

The ‘ITween’ interface defines a common interface for all tween objects.
Extends the PathTween class with dispose, refresh and read-only properties.
protected const DEFAULT_TRANSITION: String
The default transition to use for the tween.
protected const PROPERTY: String
Meta data for representing the property being animated.
protected var m_objToTween: DisplayObject
A reference to the display object to be tweened.
protected var m_objPath: Path
The path the target object is to be animated along.
protected var m_bOrientToPath: Boolean
A value for determining whether or not to orient the object to the paths direction.
protected var m_uFirstFrame: uint
The first frame of the tween.
protected var m_uLastFrame: uint
The last frame of the tween.
protected var m_strTransition: String
The name of the transition to be used for the tween.
protected var m_fncTransition: Function
A reference to the transition being used for the tween.
protected var m_bIsDirty: Boolean
Determines whether or not this tween has changed and needs compared towards it’s target value again.
protected var m_nStartRotation: Number
Stores the starting rotational value of the object being tween.
public function PathTween(objToTween: DisplayObject,  
objPath: Path,  
bOrientToPath: Boolean,  
uFirstFrame: uint,  
uLastFrame: uint,  
strTransition: String = DEFAULT_TRANSITION)
Constructor.
public function clone():ITween
Creates a new path tween object that is a clone of this object.
public function renderFrame(uFrame: uint):void
Renders the specified frame.
public function get firstFrame():uint
Gets the first frame of the timeline that has a keyframe on it.
public function get lastFrame():uint
Gets the last frame of the timeline that has a keyframe on it.
public function get target():Object
Gets a reference to the target object being tweened.
public function get property():String
Gets a string of the target property.
Close