KeyframeAnimation

animation. KeyframeAnimation

new KeyframeAnimation

Creates a KeyframeAnimation instance
Parameters:
Name Type Argument Description
duration number | string The duration, either as frames (number) or as seconds (e.g. '1s')
properties Object <optional>
The keyframes to animate through
options Object <optional>
Additional options
Properties
Name Type Argument Default Description
easing String | Function <optional>
Easing function for each sub-animation
subjects Array | Object <optional>
The subject(s) (e.g. DisplayObjects) of the keyframe-animation
delay Number | String <optional>
0 Delay before animation begins, in frames or seconds
Returns:
An KeyframeAnimation instance
Type
KeyframeAnimation

Mixes In

Methods

addSubject

Adds a subject to the keyframe-animation
Parameters:
Name Type Description
subject Object The subject (usually a DisplayObject)

addSubjects

Adds multiple subjects to the animation
Parameters:
Name Type Description
subjects Array Array of subjects to add

clone

Clones the KeyframeAnimation instance.
Returns:
The clone
Type
Animation

pause

Pauses an animation

play

Starts or resumes an animation Optionally changes the subjects of the animation.
Parameters:
Name Type Argument Description
subjects Object <optional>

removeSubject

Removes a subject from the animation
Parameters:
Name Type Description
subject Object The subject to remove

removeSubjects

Removes a subject from the animation
Parameters:
Name Type Description
subjects Array Array of subjects to remove

reset

Resets a keyframe animation (so it's ready to begin again)