Jump to content
Search Community

Easy one i suppose...toggle from two different timelines

monema test
Moderator Tag

Go to solution Solved by akapowl,

Recommended Posts

Ok now... i need to trigger an animation on click and at the same time,to reset  from start one  other animation so to make the usual toggle effects from two differen animations.

It's not a reverse situation i need different behaviour from the two timelines

 

So click  a - play a - reset b to time 0

click b - play b - reset a to time 0.

 

Thank you so much for the amazing support you are doin...and the patience too.

 

 

 

Link to comment
Share on other sites

  • Solution

Hey @monema

 

How exaxtly to do that depends on what exactly is needed, like; do both timelines tween on the same element?

 

If not, something like this should be sufficient

 

See the Pen bde800c97c312aa05efccdd40320ccf6 by akapowl (@akapowl) on CodePen

 

 

If they do though, you'd need to make sure, the other timeline stops on click, and everything that has been applied so far, gets wiped, so you have no interfering values, when tweening on that element freshly ( e.g. by setting clearProps: 'all' to that element)

 

See the Pen cc60dae8ce5d9b5ccb3ec028f919301b by akapowl (@akapowl) on CodePen

 

 

Hope this helps.

 

Cheers,

Paul

 

 

  • Like 5
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...