luxury Posted September 3, 2015 Share Posted September 3, 2015 Hi there! So the issue that I'm running into is that I am trying to pause all of the tweens that are .isActive(). This works for all tweens that are actively tweening, but not those that have a delay on them. They will then play while everything else if paused. So what I'm looking for is a way to get .isActive() that includes delayed tweens. Any help? Some background: Originally, I was using .pauseAll(true, true), and .resumeAll(true, true). And that worked as expected, except I couldn't continue using that method because I can't resume all tweens because some will need to be resumed, and some will still need to remain paused. So now I'm using getAllTweens(), and then storing off only the active ones using .isActive() and then using .pause() and .resume() on only those that are stored off. Is there a way for .pause() to behave more like .pauseAll() or is there some other way that would work? Thanks! This is using TweenMax and as2. I'm not using TimelineMax, nor can I for this project. Link to comment Share on other sites More sharing options...
GreenSock Posted September 3, 2015 Share Posted September 3, 2015 If you're trying to pause everything, have you looked into TimelineLite.exportRoot()? That basically gathers up all the tweens that are currently on the root timeline and chucks them all into a TimelineLite wrapper that you can control however you want (pause(), resume(), timeScale(), whatever). var tl = TimelineLite.exportRoot(); tl.pause(); If you want to see if a tween/timeline is BEFORE its delay has expired, you could check like: if (tween.timeline.time() < tween.startTime()) { //do stuff } Does that help? 1 Link to comment Share on other sites More sharing options...
luxury Posted September 3, 2015 Author Share Posted September 3, 2015 Your second option worked like a charm. Thank so much! 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