Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

Update child tween start time

Recommended Posts



Wondering if it's possible to add children to a nested timeline and have them affect previously added children.


Please see the codepen sample for a better explanation:



See the Pen BoKopg by brancusi (@brancusi) on CodePen

Link to comment
Share on other sites

Thanks for the demo

The short answer is no, the engine does not account for automatically moving children around when you add new child elements (tweens, timelines).


You can change the startTime() of titleTween:





Normally I would suggest using shiftChildren()



But the problem with your demo is that you have an empty nested timeline added at the same time as your first tween


If you call shiftChildren(5) on tl1, both tl2 and titleTween will move. 
You might want to try a more dynamic approach where you create a function that re-builds your timeline when you add more things. 
  • Like 1
Link to comment
Share on other sites

Thanks Carl, really appreciate all the feedback.

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.