AdvancedTween

The ‘AdvancedTween’ class tweens the property of an object using a path as a graph.  The ‘x’ axis of the path represents the frames and the ‘y’ axis represents the value of the property.

See Also

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

Summary
AdvancedTweenThe ‘AdvancedTween’ class tweens the property of an object using a path as a graph.
Constants
DEFAULT_TRANSITIONThe default transition to use for the tween.
Variables
m_objToTweenA reference to the object to be tweened.
m_strPropertyThe object’s property that is getting tweened.
m_objPathHolds a path object whose ‘x’ axis represents the frame number and ‘y’ axis represents the property value.
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.
Functions
AdvancedTweenConstructor.
cloneCreates a new advanced 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.

Variables

m_objToTween

protected var m_objToTween: Object

A reference to the object to be tweened.

m_strProperty

protected var m_strProperty: String

The object’s property that is getting tweened.

m_objPath

protected var m_objPath: Path

Holds a path object whose ‘x’ axis represents the frame number and ‘y’ axis represents the property value.

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.

Functions

AdvancedTween

public function AdvancedTween(objToTween: Object,  
strProperty: String,  
objPath: Path,  
strTransition: String = DEFAULT_TRANSITION)

Constructor.

Parameters

param objToTween The object to be tweened.
param strProperty The object’s property that is getting tweened.
param objPath The path object to use as data for this tween.  The ‘x’ axis of the path represents the frame number and the ‘y’ axis represents the property value.
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 advanced tween object that is a clone of this object.

Returns

A new advanced 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 AdvancedTween class with dispose, refresh and read-only properties.
protected const DEFAULT_TRANSITION: String
The default transition to use for the tween.
protected var m_objToTween: Object
A reference to the object to be tweened.
protected var m_strProperty: String
The object’s property that is getting tweened.
protected var m_objPath: Path
Holds a path object whose ‘x’ axis represents the frame number and ‘y’ axis represents the property value.
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.
public function AdvancedTween(objToTween: Object,  
strProperty: String,  
objPath: Path,  
strTransition: String = DEFAULT_TRANSITION)
Constructor.
public function clone():ITween
Creates a new advanced 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