Members
Suffix added to label for a loop.
Suffix added to label for a stop.
Methods
Animator.fromTo (instance, start, end, loop, callback) AnimatorTimeline static
Play a MovieClip from a start to end frame.
Name | Type | Attributes | Description |
---|---|---|---|
instance |
MovieClip |
Movie clip to play. |
|
start |
number | string |
The starting frame index or label. |
|
end |
number | string |
The ending frame index or label. |
|
loop |
boolean |
<optional> |
If the animation should loop. |
callback |
() => void |
<optional> |
Optional callback when complete |
Returns:
Type | Description |
---|---|
AnimatorTimeline | Timeline object for stopping or getting progress. |
Animator.play (instance, callback) AnimatorTimeline static
Play the entire duration of the MovieClip.
Name | Type | Attributes | Description |
---|---|---|---|
instance |
MovieClip |
Movie clip to play. |
|
callback |
string | (() => void) |
<optional> |
Optional callback when complete |
Returns:
Type | Description |
---|---|
AnimatorTimeline | Timeline object for stopping or getting progress. |
Animator.play (instance, label, callback) AnimatorTimeline static
Play an animation by frame labels. For instance, play animation sequence from 'idle' to 'idle_stop' or 'idle_loop'. If no event label is provided, will play the entire duration of the MovieClip.
Name | Type | Attributes | Description |
---|---|---|---|
instance |
MovieClip |
Movie clip to play. |
|
label |
string |
The frame label event to call, if no event is provided will use the entire length of the MovieClip. |
|
callback |
() => void |
<optional> |
Optional callback when complete |
Returns:
Type | Description |
---|---|
AnimatorTimeline | Timeline object for stopping or getting progress. |
Stop the animation by instance.
Name | Type | Description |
---|---|---|
instance |
MovieClip |
Movie clip to play. |
Stop all the currently playing animations.
Animator.to (instance, end, callback) AnimatorTimeline static
Play an animation from the current frame to an end frame or label.
Name | Type | Attributes | Description |
---|---|---|---|
instance |
MovieClip |
Movie clip to play. |
|
end |
string | number |
The end frame or label. |
|
callback |
() => void |
<optional> |
Optional callback when complete |
Returns:
Type | Description |
---|---|
AnimatorTimeline | Timeline object for stopping or getting progress. |