Jump to content


Resume a paused timeline from another timeline

Moderator Tag
Go to solution Solved by phillip_vale,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts



I am trying to work out best practice to pause another play another timeline.


I have included 2 attempts with the first commented out.


Ideally i would like it to run so that in the sequence of the first timeline (tl1) it resumes the paused timeline (tl2).


I'm not sure if this means that an onComplete need to be added or whether it can just be a command in the timeline.




.from("object", 1, {})...

.from("object", 1, {})...


.from("object", 1, {})...


Sorry if the syntax is incorrect just trying to explain my problem.


Any help is appreciated.


Thank you,



See the Pen rLVMaB?editors=1010 by phillip_vale (@phillip_vale) on CodePen

Link to comment
Share on other sites

kind of hard to understand, but it looks like you are close but you only created one tween for #moving... nothing for #move.

maybe this will help:



However this really doesn't employ any pausing or resuming. you are just adding a child timeline to a parent timeline and they will naturally play in order.

  • Like 1
Link to comment
Share on other sites

Amazing, Carl to the rescue again!


I guess i was wanting to have a mainTL with another timeline resting on pause that would play once the first 2 items in the mainTL have.


I have updated my codepen to this...

var mainTL = new TimelineMax()
  .to("#moving", 1, {x: 100})
var otherTL = new TimelineMax({paused: true})
  .to("#move", 1, {x: 100})

I have heard about nested timelines in my reading. Does that sound like where i am going with this?


Thanks for you help again,



Link to comment
Share on other sites

Glad you found something that worked for you, although that's not a nested timeline. Here's what a nested timeline would look like:

var mainTL = new TimelineMax()
  .to("#moving", 1, {x: 100})
var otherTL = new TimelineMax();
  .to("#move", 1, {x: 100});

mainTL.add(otherTL); //<-- this is nesting

This solution will work great backwards and forwards whereas the way you did it wouldn't really give you a timeline that's completely controllable in any direction (seek, reverse, whatever). 


I'd highly recommend watching/reading these: 




Happy tweening!

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.