RotationAnimation

RotationAnimation

Animates the ‘rotation’ property of a display object to the desired target value. 

The advantage of using this method over the generic ‘Property’ method is that you can specify the amount of times the animation occurs using the ‘number of repeats’ parameter.  If the number of repeats is set to ‘1’, the animation will occur one time and animate the rotation property to the specified target value.  If a value other than ‘1’ is used, the animation will occur the set number of times, but instead of animating the rotation property to the target value, the target value will be added to the current rotation value each time the animation occurs.  A value of ‘0’ for the number of repeats will cause the animation to continue until it is manually removed.

See Also

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

Summary
RotationAnimationAnimates the ‘rotation’ property of a display object to the desired target value.
Constants
PROPERTYMeta data for representing the property being animated.
Variables
m_nStartValueHolds the starting value for the ‘rotation’ property.
m_nTargetValueHolds the target value for the ‘rotation’ property.
m_nChangeValueHolds the change in value for the ‘rotation’ 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.
m_uNumRepeatsHolds the number of times this animation should repeat itself.
m_uRepeatCountHolds the current number of repeats that have taken place for this animation.
Functions
RotationAnimationConstructor.
renderRenders the animation.

Constants

PROPERTY

public static const PROPERTY: String

Meta data for representing the property being animated.

Variables

m_nStartValue

protected var m_nStartValue: Number

Holds the starting value for the ‘rotation’ property.

m_nTargetValue

protected var m_nTargetValue: Number

Holds the target value for the ‘rotation’ property.

m_nChangeValue

protected var m_nChangeValue: Number

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

m_uNumRepeats

protected var m_uNumRepeats: uint

Holds the number of times this animation should repeat itself.

m_uRepeatCount

protected var m_uRepeatCount: uint

Holds the current number of repeats that have taken place for this animation.

Functions

RotationAnimation

public function RotationAnimation(objTarget: DisplayObject,
nTargetValue: Number,
nDuration: Number,
uNumRepeats: uint,
strTransition: String,
uRenderMethod: uint)

Constructor.

Parameters

param objTarget The target object being animated.
param nTargetValue The value to animate the target object’s rotation property to.
param nDuration The duration of the animation in milliseconds.
param uNumRepeats The number of times the animation should repeat itself.  A value of ‘0’ will cause the animation to go on until manually stopped.
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_nStartValue: Number
Holds the starting value for the ‘rotation’ property.
protected var m_nTargetValue: Number
Holds the target value for the ‘rotation’ property.
protected var m_nChangeValue: Number
Holds the change in value for the ‘rotation’ 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.
protected var m_uNumRepeats: uint
Holds the number of times this animation should repeat itself.
protected var m_uRepeatCount: uint
Holds the current number of repeats that have taken place for this animation.
public function RotationAnimation(objTarget: DisplayObject,
nTargetValue: Number,
nDuration: Number,
uNumRepeats: uint,
strTransition: String,
uRenderMethod: uint)
Constructor.
public override function render():Boolean
Renders the animation.
Close