Share Posted April 25, 2018 I have a timeline with couple of tweens in it. Some of those tweens get destroyed by TweenLite.killTweensOf(myNode) while the timeline is playing but after removing those tweens, the position of the next tweens don't change and the timeline act like nothing has been changed. I expect when I remove a tween from timeline, then any tween after that shifts and start earlier. Is it even possible to do what I want to do? Link to post Share on other sites
Share Posted April 25, 2018 Hi Eeliya, That's the expected behaviour. When you add a tween to a timeline, it's not like if you added it to the end of an array of tweens; you just added it at a specific time into an animation. So if you add a tween on the 3rd second of a timeline, it will play at that moment, regardless of what's before or after it. If you would like animations to shift, then maybe such an array is the way to go. Here's an example: See the Pen KRMmBx?editors=0011 by Acccent (@Acccent) on CodePen 6 Link to post Share on other sites
Share Posted April 25, 2018 HI @Eeliya You should also take a look at the .shiftChildren() method. https://greensock.com/docs/TimelineMax/shiftChildren() Happy tweening. 6 Link to post Share on other sites
Author Share Posted April 25, 2018 Thank you @Acccent and @PointC 2 Link to post Share on other sites
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