Jump to content
GreenSock

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

How to kill tween and force to complete?

Recommended Posts

This seems like it should be a no-brainer, but I've searched the API and can't see how to kill a Tween(Max) and force it to complete.

 

I see how to kill ALL tweens and force to complete, or child tweens of a particular object and force them to complete, but for a TweenMax I didn't see the option to force to complete.

 

Could someone point me in the right direction?  Thanks!

Link to comment
Share on other sites

Sure, it should be as simple as: 

yourTween.totalProgress(1).kill();

or

yourTween.totalTime( yourTween.totalDuration() ).kill();
  • Like 1
Link to comment
Share on other sites

Doh!

 

Of course.  

 

When you chain calls, they're always evaluated left to right?

Link to comment
Share on other sites

Yep, chains always evaluate left-to-right (that's a language thing, not really specific to GSAP). Makes things easy to group and keeps code concise. Enjoy!

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