SizeAnimation

SizeAnimation

The ‘SizeAnimation’ class animates the ‘width’ and ‘height’ 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
SizeAnimationThe ‘SizeAnimation’ class animates the ‘width’ and ‘height’ properties of a display object.
Constants
PROPERTYMeta data for representing the property being animated.
Variables
m_nStartValueWHolds the starting value for the ‘width’ property.
m_nTargetValueWHolds the target value for the ‘width’ property.
m_nChangeValueWHolds the change in value for the ‘width’ property.
m_nStartValueHHolds the starting value for the ‘height’ property.
m_nTargetValueHHolds the target value for the ‘height’ property.
m_nChangeValueHHolds the change in value for the ‘height’ 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
SizeAnimationConstructor.
renderRenders the animation.

Constants

PROPERTY

public static const PROPERTY: String

Meta data for representing the property being animated.

Variables

m_nStartValueW

protected var m_nStartValueW: Number

Holds the starting value for the ‘width’ property.

m_nTargetValueW

protected var m_nTargetValueW: Number

Holds the target value for the ‘width’ property.

m_nChangeValueW

protected var m_nChangeValueW: Number

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

m_nStartValueH

protected var m_nStartValueH: Number

Holds the starting value for the ‘height’ property.

m_nTargetValueH

protected var m_nTargetValueH: Number

Holds the target value for the ‘height’ property.

m_nChangeValueH

protected var m_nChangeValueH: Number

Holds the change in value for the ‘height’ 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

SizeAnimation

public function SizeAnimation(objTarget: DisplayObject,
nTargetValueW: Number,
nTargetValueH: Number,
nDuration: Number,
strTransition: String,
uRenderMethod: uint)

Constructor.

Parameters

param objTarget The target object being animated.
param nTargetValueW The target value for the ‘width’ property of the target object.
param nTargetValueH The target value for the ‘height’ 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_nStartValueW: Number
Holds the starting value for the ‘width’ property.
protected var m_nTargetValueW: Number
Holds the target value for the ‘width’ property.
protected var m_nChangeValueW: Number
Holds the change in value for the ‘width’ property.
protected var m_nStartValueH: Number
Holds the starting value for the ‘height’ property.
protected var m_nTargetValueH: Number
Holds the target value for the ‘height’ property.
protected var m_nChangeValueH: Number
Holds the change in value for the ‘height’ 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 SizeAnimation(objTarget: DisplayObject,
nTargetValueW: Number,
nTargetValueH: Number,
nDuration: Number,
strTransition: String,
uRenderMethod: uint)
Constructor.
public override function render():Boolean
Renders the animation.
Close