Jump to content
Search Community

any way to kill all delayed calls? [SOLVED]

t0m test
Moderator Tag

Recommended Posts

  • 1 year later...
  • 1 month later...
...remove all delayed calls within an object, as opposed to global...

I'm not sure what "delayed calls within an object" means.

 

You can already do TweenLite.killTweensOf(myFunction) if you want to kill all the delayed calls to a particular function. Is that what you need?

Link to comment
Share on other sites

That's sort of what I was after. The API Documentation does not mention this, so I never tried it.

 

How would this work if I called an anonymous (temporarily created) function, like:

 

TweenMax.delayedCall(1, function()

{

trace("test");

});

Link to comment
Share on other sites

  • 2 years later...

Hi MegaVaha, 

If you need to just kill one delayed call use killTweensOf()

 

 

To kill all the delayedCalls (like ones created using TweenMax.delayedCall(5, myFunction) ;), you can simply call TweenMax.killTweensOf(myFunction); because delayedCalls are simply tweens that have their target and onComplete set to the same function (as well as a delay of course).

 

 

http://api.greensock.com/as/com/greensock/TweenMax.html#killTweensOf()

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