Jump to content
Search Community

Multiple timeline on same target

carlson test
Moderator Tag

Go to solution Solved by Cassie,

Recommended Posts

Hi all,

i want to add two anim on elements "block",but these two anims  are in different timelines.

in the first anim i want to make block rotate from 0 to 360,

in the secont anim i want to make block translateX from -200 to 0,

i need these two anim sequentially,

but at the start, the block translate x to -200,

and then start to rotate,when the rotate done,it begin to translate x to -200.

i know it can be solved in exactly one timeline, but in my real project, i do need two timeline to solve other problems,

so how can i fix this problem?

Thanks for your help

See the Pen wvpoddg?editors=1111 by matisfire (@matisfire) on CodePen

Link to comment
Share on other sites

  • Solution

Heya!

You may be looking for immediateRender:false - you're using a from tween which renders the initial 'from' position on load. Sounds like that might not be the behaviour you're after.

 

See the Pen dyJORbM?editors=0010 by GreenSock (@GreenSock) on CodePen



But saying that, I'm always cautious when people ask for solutions to a problem that's been introduced by trying to solve another unknown problem - as there's likely an easier solution to the root problem. So if this isn't what you're after, feel free to walk us through the initial problem, maybe we can find an easier way!

https://en.wikipedia.org/wiki/XY_problem

  • Like 1
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.
×
×
  • Create New...