Jump to content


remove TweenMax(); instance

Recommended Posts

Hi folks!


I am searching for the easiest way to remove a new TweenMax instance.

For example if i make a new tween like:


var sampleTween:TweenMax;
sampleTween = new TweenMax(my_mc, 1, { x:20, ease:Linear.easeNone } );


How can i remove sampleTween?

sampleTween = null?


Thanks in advance!


Link to comment
Share on other sites

If by removing a tween, you mean isntantly stop it from doing whatever it was doing, i suggest you try the kill method:




Will stop the tweening animation.

  • Like 1
Link to comment
Share on other sites

I 'd like to remove it, and make a new one with the same name!


Link to comment
Share on other sites

Héctor was correct - simply call kill() on the old one to kill it (and stop it from doing anything else) and then you can reassign a new tween instance to that variable.

sampleTween = new TweenMax(...);

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