Jump to content
Search Community

kill a delayedcall

Xristi test
Moderator Tag

Recommended Posts

I try to establish a variable for my delayed calls so I can kill them under certain circumstances. When I use the form var dC_1 = gsap.delayedCall(1, myFunction); as suggested gsap shows an error as undefined. What do I need to import to eliminate the error? When I use var dC_1 = TweenMax.delayedCall(1, myFunction); I get an error as well. I am a Shockingly Green member... perhaps I should upgrade some of my gsap imports?

Link to comment
Share on other sites

If you kill() something, it's dead. Don't kill() it if you need it later. Just pause() it instead. It might help if you provided a minimal demo so we can see the context and better understand your goal. 

 

A delayedCall() is just a tween instance with an onComplete/onReverseComplete. So you can also myCall.restart(true) to start it all over again. 

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