Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

Kill filters

Recommended Posts

Is there a way to use the TweenMax.killTweensOf(mc) for applied filters? I have applied some heavy filters that I want to have the option of completely removing from an object so I can return to the original performance speed. Basically a "reset" button.


I have tried just putting in 0 for the values or using null but I am still not able to return to the original performance before the filters were applied.

Link to comment
Share on other sites

Sure, that's what the "remove" special property is for inside any filter vars object. So if you want to remove the BlurFilter at the end of this tween, you'd do:


TweenMax.to(mc, 1, {blurFilter:{blurX:10, blurY:2, remove:true}});


And you can take advantage of TweenLite's or TweenMax's overwriting features by doing a zero-duration tween of a particular filter anytime to kill the in-progress tweens of the same filter, like:


TweenMax.to(mc, 0, {blurFilter:{remove:true}});


The same goes for the other filters like colorMatrixFilter, glowFilter, dropShadowFilter, etc.

Link to comment
Share on other sites

Fantastic! Thank you Jack. As always your responses are incredibly quick and helpful. Thank you very much.

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.