Jump to content
GreenSock

TimelineLite

.resume()

.resume( from:*, suppressEvents:Boolean ) : *

Resumes playing without altering direction (forward or reversed), optionally jumping to a specific time first.

Parameters

from: *

(default = null) — The time (or label for TimelineLite/TimelineMax instances) that the instance should jump to before resuming playback (if none is defined, it will resume wherever the playhead is currently located).

suppressEvents: Boolean

(default = true) — If true (the default), no events or callbacks will be triggered when the playhead moves to the new position defined in the from parameter.

Returns : *

self (makes chaining easier)

Details

Resumes playing without altering direction (forward or reversed), optionally jumping to a specific time first.

If you define a time to jump to (the first parameter, which could also be a label for TimelineLite or TimelineMax instances), the playhead moves there immediately and if there are any events/callbacks inbetween where the playhead was and the new time, they will not be triggered because by defaultsuppressEvents (the 2nd parameter) is true. Think of it like picking the needle up on a record player and moving it to a new position before placing it back on the record. If, however, you do not want the events/callbacks suppressed during that initial move, simply set thesuppressEvents parameter to false.

//resumes from wherever the playhead currently is:
myAnimation.resume();

//jumps to exactly 2-seconds into the animation and then resumes playback:
myAnimation.resume(2);

//jumps to exactly 2-seconds into the animation and resumes playbck but doesn't suppress events during the initial move:
myAnimation.resume(2, false);
Copyright 2017, GreenSock. All rights reserved. This work is subject to theterms of useor for Club GreenSock members, the software agreement that was issued with the membership.
×