ScaleAnimation

ScaleAnimation

The ‘ScaleAnimation’ class animates the ‘scaleX’ and ‘scaleY’ properties of a display object.  The advantage to using this animation type over the generic ‘PropertyAnimation’ is that it results in a smoother animation since the properties are updated very close to the same time.  It also generates a single event for the animation rather than one for each property seperately.

See Also

com.boostworthy.animation.management.types.PropertyAnimation, com.boostworthy.animation.management.types.abstract.Animation, com.boostworthy.animation.management.types.abstract.IAnimation

Summary
ScaleAnimationThe ‘ScaleAnimation’ class animates the ‘scaleX’ and ‘scaleY’ properties of a display object.
Constants
PROPERTYMeta data for representing the property being animated.
Variables
m_nStartValueXHolds the starting value for the ‘scaleX’ property.
m_nTargetValueXHolds the target value for the ‘scaleX’ property.
m_nChangeValueXHolds the change in value for the ‘scaleX’ property.
m_nStartValueYHolds the starting value for the ‘scaleY’ property.
m_nTargetValueYHolds the target value for the ‘scaleY’ property.
m_nChangeValueYHolds the change in value for the ‘scaleY’ property.
m_nDurationHolds the duration of the animation in milliseconds.
m_nStartTimeHolds the starting time of the animation in milliseconds.
m_fncTransitionHolds a reference to the transition function being used for this animation.
Functions
ScaleAnimationConstructor.
renderRenders the animation.

Constants

PROPERTY

public static const PROPERTY: String

Meta data for representing the property being animated.

Variables

m_nStartValueX

protected var m_nStartValueX: Number

Holds the starting value for the ‘scaleX’ property.

m_nTargetValueX

protected var m_nTargetValueX: Number

Holds the target value for the ‘scaleX’ property.

m_nChangeValueX

protected var m_nChangeValueX: Number

Holds the change in value for the ‘scaleX’ property.

m_nStartValueY

protected var m_nStartValueY: Number

Holds the starting value for the ‘scaleY’ property.

m_nTargetValueY

protected var m_nTargetValueY: Number

Holds the target value for the ‘scaleY’ property.

m_nChangeValueY

protected var m_nChangeValueY: Number

Holds the change in value for the ‘scaleY’ property.

m_nDuration

protected var m_nDuration: Number

Holds the duration of the animation in milliseconds.

m_nStartTime

protected var m_nStartTime: Number

Holds the starting time of the animation in milliseconds.

m_fncTransition

protected var m_fncTransition: Function

Holds a reference to the transition function being used for this animation.

Functions

ScaleAnimation

public function ScaleAnimation(objTarget: DisplayObject,
nTargetValueX: Number,
nTargetValueY: Number,
nDuration: Number,
strTransition: String,
uRenderMethod: uint)

Constructor.

Parameters

param objTarget The target object being animated.
param nTargetValueX The target value for the ‘scaleX’ property of the target object.
param nTargetValueY The target value for the ‘scaleY’ property of the target object.
param nDuration The duration of the animation in milliseconds.
param strTransition The transition to be used for the animation.
param uRenderMethod The method being used to render this animation. 

See Also

com.boostworthy.animation.easing.Transitions, com.boostworthy.animation.rendering.RenderMethod

render

public override function render():Boolean

Renders the animation.

Returns

A boolean value that is ‘true’ if the animation was updated successfully, ‘false’ if it was not. 

The ‘Animation’ class is the base class for all animation objects.
public static const PROPERTY: String
Meta data for representing the property being animated.
protected var m_nStartValueX: Number
Holds the starting value for the ‘scaleX’ property.
protected var m_nTargetValueX: Number
Holds the target value for the ‘scaleX’ property.
protected var m_nChangeValueX: Number
Holds the change in value for the ‘scaleX’ property.
protected var m_nStartValueY: Number
Holds the starting value for the ‘scaleY’ property.
protected var m_nTargetValueY: Number
Holds the target value for the ‘scaleY’ property.
protected var m_nChangeValueY: Number
Holds the change in value for the ‘scaleY’ property.
protected var m_nDuration: Number
Holds the duration of the animation in milliseconds.
protected var m_nStartTime: Number
Holds the starting time of the animation in milliseconds.
protected var m_fncTransition: Function
Holds a reference to the transition function being used for this animation.
public function ScaleAnimation(objTarget: DisplayObject,
nTargetValueX: Number,
nTargetValueY: Number,
nDuration: Number,
strTransition: String,
uRenderMethod: uint)
Constructor.
public override function render():Boolean
Renders the animation.
Close