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
|
Returns:
An KeyframeAnimation instance
- Type
- KeyframeAnimation
Mixes In
Methods
-
addSubject
-
Adds a subject to the keyframe-animation
Parameters:
Name Type Description subjectObject The subject (usually a DisplayObject) -
addSubjects
-
Adds multiple subjects to the animation
Parameters:
Name Type Description subjectsArray 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 subjectsObject <optional>
-
removeSubject
-
Removes a subject from the animation
Parameters:
Name Type Description subjectObject The subject to remove -
removeSubjects
-
Removes a subject from the animation
Parameters:
Name Type Description subjectsArray Array of subjects to remove -
reset
-
Resets a keyframe animation (so it's ready to begin again)