Jump to content


Reverse all active timelines

Moderator Tag
Go to solution Solved by GreenSock,

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

Is there anyway we can do this?


I am getting an udefined error with


Is that because I am running it before any Timeline is started?


I do not want my animations over each other, so I need all other timelines reversed before starting any of them.


I am using TimelineMax for lightbox animation.

Link to comment
Share on other sites

It sounds like maybe you're trying to literally call TimelineMax.getActive() as if it's a static method instead of an instance method. In other words:


var tl = new TimelineMax();
...add stuff to the timeline...
tl.getActive(); //<-- notice this is called on the instance, not the TimelineMax class itself. 

Does that help?

  • Like 1
Link to comment
Share on other sites

Thanks GreenSock, will it retrieve all currently active Timelines ?

Link to comment
Share on other sites

  • Solution

You mean all active timelines in the entire application? No. That method is called on a single instance and it'll return all of the active child tweens and/or timelines. GSAP doesn't maintain a list of all of the timelines globally. You can, however, keep an array yourself and then loop through it and check each timeline's isActive() method to determine if it's active. 

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.