Jump to content
Search Community

Can't overwrite properly on mouseleave

AsKadir test
Moderator Tag

Recommended Posts

I've very confused why you are adding the .set()s to the timeline. Why not just use gsap.set()? 

 

However, in this case, all you need to do instead of any .set()s is just tl.pause(0).

 

It'd also be helpful to keep track of the state to know when you should play the timeline.

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

 

I highly recommend my article on animating efficiently because it covers using control methods :) 

  • Like 1
Link to comment
Share on other sites

14 minutes ago, ZachSaucier said:

You really should not be using set calls here. Because they prevent the timeline from functioning again so you'd have to recreate it again. Just use .pause(0).

Thanks a lot, Zach!!! I really appreciate your help!

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...