Jump to content
GreenSock

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

How to have two lines of timeline execute at same time?

Recommended Posts

So this is a really simple question and I'll probably feel really dumb once finding out the answer - but how do I get two lines of the same timeline to execute at the same time? I built a really crude codepen as an example - 

See the Pen bxoYrG by kbeats (@kbeats) on CodePen

 

I have two objects that I want to tween to different values, but I want them to begin their timeline at the same time. Do I need to make two separate timelines instead of having them both on the same one? 

 

 

Thanks!

See the Pen bxoYrG by kbeats (@kbeats) on CodePen

Link to comment
Share on other sites

Thank you, that is awesome! I guess I should have built my codepen to match my exact problem, however. In my project I'm using appendMultiple to have several objects move on each line, I've tried adding this method above to my project and it doesn't seem to work? I'm not sure what I'm doing wrong. 

 

See the Pen bxoYrG by kbeats (@kbeats) on CodePen

 

Link to comment
Share on other sites

5 minutes ago, kbeats said:

In my project I'm using appendMultiple ... 

 

 

 

Whoa! That's going back!

 

I'm not sure  `appendMultiple` and `allTo` are supported any longer. I think you'd want to look at add() instead.

 

(I could be wrong though)

 

  • Like 2
Link to comment
Share on other sites

appendMultiple is indeed deprecated and replaced with add().

 

See the Pen yxzpQq by PointC (@PointC) on CodePen

 

  • Like 6
Link to comment
Share on other sites

Very cool! I had no idea lol. Thank you! 

  • Like 3
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.
×