Share Posted December 17, 2016 Hi, I have many TimelineMax animations either running at the same time, or not running at all; is it possible to create an event that will be called everytime any timeline is ticking, and get the timeline that is ticking in that event? an alternative would be to set a simple javascript setTimeout call but only if I can tell if there are currently no running animations; is it possible to check if ANY timeline is currently running? Thanks, Elior Link to comment Share on other sites More sharing options...
Share Posted December 18, 2016 That functionality doesn't exist in the API (that I am aware of) but there are 2 ways worth exploring: 1 give every timeline an onUpdate callback that notifies some object that the timeline is currently active 2 put all your timelines in an array and constantly loop through the array and check the isActive() status of each: http://greensock.com/docs/#/HTML5/GSAP/TimelineLite/isActive/ IF you find that no animations are active you could then stop doing this check and restart it the next time you play another animation. 3 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now