Jump to content
Search Community

TimelineLite kill() Method to Kill all Timeline Animations Immediately

icg_cnunez test
Moderator Tag

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 have a DOM element that stores a TimelineLite Object in a data object. I reference this stored TimelineLite Object at a given time and call the kill() method on this object.

 

From what I understand and desire, the kill() method will immediately stop the animations on the TimelineLite Object and release for garbage collection.

 

I have several tweens and potentially timelines nested in the referred TimelineLite Object. I want them all to stop immediately even if currently tweening. They should stop right where they are.

 

This is not what I am experiencing. Currently tweening animations/tweens continue to run until completion, and only then do animations stop (do not continue to run).

 

Am I doing something wrong here? Should I be using a different method to accomplish the desired result? Should I be getting the nested tweens/timelines and then kill() those first?

Link to comment
Share on other sites

Hi,

 

Sorry to hear things might not be working properly. I haven't experienced calling timeline.kill() and having the timeline continue playing.

 

Can you provide a super simple example that we can test? Using codepen.io or jsfiddle is best but you can also attach a zip. We'll certainly look into it.

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.
×
×
  • Create New...