Va1tra Posted June 23, 2014 Posted June 23, 2014 I have the following situation: I have one timeline. I append to it a sequance of TweenLites with target1. A little later i kill tweens of target1, and try to launched a sequance of tweens for target2. The problem: animation for target2 is not launched, it's only works when i call timeline.kill() instead of timeline.killTweenOf(target1) I hoped to use a single instance of TimelineLite to handle all needed animations. i.e. I want to use timeline.append, timeline.insert for many targets, and if the target is repeated or i just needed to get rid of tweens, 1stly kill it's animation and run new after. What i'm doing wrong? var timeline:TimelineLite = new TimelineLite(); for each (var obj:Object in transitions) { timeline.append(new TweenLite(target1, transition.duration, transition.to)); } timeline.play(); After a few time the following code is launched timeline.killTweensOf(target1); for each (var obj:Object in transitions) { timeline.append(new TweenLite(target2, transition.duration, transition.to)); } timeline.play();
Carl Posted June 23, 2014 Posted June 23, 2014 Hi, It would help to see a very simplified file that exhibits this behavior. I'd like to test the duration() of the timeline after the killTweensOf() and see where the tweens are being inserted. You can zip your test fla and attach it to this post using "more reply options" in the meantime, please see if calling play() on the timeline after you add the new tweens helps and please be sure you are using the latest version of GSAP found here: http://www.greensock.com/?download=GSAP-AS3
Va1tra Posted June 24, 2014 Author Posted June 24, 2014 My apologies. I've read inattentively what the download link contains here http://www.greensock.com/timelinelite/. With new 12 version's timeline.kill(null, target1) it works great. Thanks for reply. 1
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