Overview

Represents an animation, defined by one or more KeyFrames.

Attribute Summary

nametypedescription
Public
autoReverseBoolean

Defines whether this animation reverses direction on alternating cycles.

INDEFINITEInteger

Used to specify an animation that repeats indefinitely (until the stop() method is called).

keyFramesKeyFrame[]

Defines the sequence of KeyFrames in this animation.

pausedBoolean

Read-only attribute that indicates whether the animation is currently paused.

repeatCountNumber

Defines the number of cycles in this animation.

runningBoolean

Read-only attribute that indicates whether the animation is currently running.

toggleBoolean

Defines whether this animation reverses direction in place each time start() is called.

Protected

Inherited Attributes

Function Summary

public pause() : Void

Pauses the animation.

public resume() : Void

Resumes the animation from a paused state.

public start() : Void

Starts (or restarts) the animation.

public stop() : Void

Stops the animation.

Inherited Functions

Attributes

public autoReverse: Boolean

Defines whether this animation reverses direction on alternating cycles. If true, the animation will proceed forward on the first cycle, then reverses on the second cycle, and so on. The default value is false, indicating that the animation will loop such that each cycle proceeds forward from the initial KeyFrame.

public static INDEFINITE: Integer

Used to specify an animation that repeats indefinitely (until the stop() method is called).

public keyFrames: KeyFrame[]

Defines the sequence of KeyFrames in this animation. If a KeyFrame is not provided for the time==0s instant, one will be synthesized using the target values that are current at the time start() is called.

public paused: Boolean

Read-only attribute that indicates whether the animation is currently paused.

This value is initially false. It will become true after pause() has been called on a running animation, and then becomes false again after an explicit call to resume() or stop().

Note that running will remain true even when paused==true.

public repeatCount: Number

Defines the number of cycles in this animation. The repeatCount may be INDEFINITE for animations that repeat indefinitely, but must otherwise be >= 0. The default value is 1.

public running: Boolean

Read-only attribute that indicates whether the animation is currently running.

This value is initially false. It will become true after start() has been called, and then becomes false again after the animation ends naturally, or after an explicit call to stop().

Note that running will remain true even when paused==true.

public toggle: Boolean

Defines whether this animation reverses direction in place each time start() is called. If true, the animation will initially proceed forward, then restarts in place except heading in opposite direction. The default value is false, indicating that the animation will restart from the initial KeyFrame each time start() is called.

Functions

public pause():Void

Pauses the animation. If the animation is not currently running, this method has no effect.

public resume():Void

Resumes the animation from a paused state. If the animation is not currently running or not currently paused, this method has no effect.

public start():Void

Starts (or restarts) the animation.

If toggle==false and the animation is currently running, the animation will be restarted from its initial position.

If toggle==true and the animation is currently running, the animation will immediately change direction in place and continue on in that new direction. When the animation finishes in one direction, calling start() again will restart the animation in the opposite direction.

public stop():Void

Stops the animation. If the animation is not currently running, this method has no effect.