Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
ejlee

How to pause Timeline

Recommended Posts

I have a timeline which looks like this below

 

this.tl = new TimelineMax({paused: true})    
        
this.tl.to(this.images[this.count], this.duration, { y: '0%', force3D: true, ease: new Ease(BezierEasing(1, 0.055, 0.015, 0.985))})    
this.tl.to(this.images[this.count], this.duration, { y: '-100%', force3D: true, delay: 1, ease: new Ease(BezierEasing(1, 0.055, 0.015, 0.985)),clearProps: 'y'})     

this.tl.restart()

 

What i'm trying to achieve is to pause all animation that happens on this timeline, and any animation that is currently running on this "this.tl" timeline.

 

I have tried to use

 

this.tl.pause()

   

This pauses the animation, however if there is an animation already running it doesn't pause that.   Is there a pauseAll for the timeline?

 

I know I can use this code below, but I do not want to use it because this pauses all globally and it affects my other tweens.

TweenMax.pauseAll()

 

 

Link to post
Share on other sites

Hi,

 

Hm, I can not think of a case where pausing a timeline would not pause all animations inside of it, especially ones that are already running.

 

this.tl.pause() should absolutely pause all animations inside tl and no others. Also, TweenMax.pauseAll() should pause every animation as you described as well. 

 

 

In order to help further we will need to see a reduced test case that shows the behavior you are describing (tl.pause() not working). There is a chance I may be mis-understanding the issue, but a demo will certainly be the best way to clarify the problem and for us to quickly propose a solution.

 

Here are some instructions on using CodePen to create a demo.

 

Thanks!

 

 

  • Like 3
Link to post
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.

×