Jump to content
GreenSock

kaotix

TimelineMax addPause() internmittedly not respected

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 haven't been able to find an exact way to reproduce this.
 
I have a simple timeline ($elBg is a jquery element): 

tl.add('intro').addPause('intro')
.to($elBG, 2, {left: '-1040px'})
.add('something').addPause('something')
.to($elBG, 2, {left: '-2040px'})
.add('ending').addPause('ending')
.to($elBG, 2, {left: '-3040px'});

And I have two buttons that trigger .play or .reverse to move between the scenes. Every now and then the pause is skipped over and it continues to the next scene. I can't find an exact way to reproduce this I'm afraid as most of the time it works as expected. I have solved the issue by using tl.tweenTo(tl.getLabelBefore()); and tl.tweenTo(tl.getLabelAfter()); instead for my buttons but thought you might like to know incase there was a bug.

 

Adam.

Link to comment
Share on other sites

Hey

 

The default demo pen that you posted exhibits the issue that I described as it uses the addPause method.

Link to comment
Share on other sites

Sorry for the hassle. You are correct, there is a problem. We were recently alerted to this in another thread.

 

If possible try reverting back to an earlier version.

 

We are working on a fix.

  • Like 1
Link to comment
Share on other sites

Sorry about the hassle. I have attached a preview copy of GSAP 1.15.2 (not released yet). This should resolve the issue. Would you mind double-checking and letting us know? 

GSAP_1.15.2_preview1.zip

  • Like 1
Link to comment
Share on other sites

Hey Jack. That seems to have fixed it as far as I can tell, no hassle at all. Thanks for that. Awesome as always.

 

Adam

Link to comment
Share on other sites

Just to add, not sure if this is related or it might even be intended behaviour.

 

When you first load the pen posted above, if you press reverse first you have to then press play twice to get it to start playing.

Link to comment
Share on other sites

  • 2 weeks later...

ugh! so glad i started google this very issue i was having with the .addPause!  I thought i was going crazy and my code was messed up!  

Link to comment
Share on other sites

This should be resolved in the latest release (1.16.0). Thanks for your patience, and sorry about the glitch. Happy tweening!

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.
×