animaker Posted November 2, 2021 Share Posted November 2, 2021 (edited) I am trying to interrupt a tween before it has begun, then restarting it while respecting the delay. As you see from the pen, everything works though the delay is reset to 0 in the process. Any advice on how to retain the 3 second delay would be appreciated. See the Pen oNeozRr by loxks (@loxks) on CodePen Edited November 2, 2021 by animaker Improving wording Link to comment Share on other sites More sharing options...
PointC Posted November 2, 2021 Share Posted November 2, 2021 Hi @animaker Welcome to the forum and thanks for being a club member. I think you're looking for: tw.restart(true); From the docs: //restarts, not including any delay that was defined myAnimation.restart(); //restarts, including any delay, and doesn't suppress events during the initial move back to time:0 myAnimation.restart(true, false); https://greensock.com/docs/v3/GSAP/Tween/restart() Happy tweening. 4 Link to comment Share on other sites More sharing options...
animaker Posted November 2, 2021 Author Share Posted November 2, 2021 Fantastic, thanks for that, @PointC 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now