Jump to content



Recommended Posts

Hello there,


Assuming this is a pretty simple idea I just seem to be hitting a wall. I've got a button and on every click I'd like it to blur an image in increments. So everytime I click this button it runs a function where my MC runs the blurFilter below


TweenLite.to(mc, 1, {blurFilter:{blurX:10, blurY:10}});


If that was the result of clicking the button once it would BlurX and Y to 10. On click the button a second time it wouldn't do anything because it's already at 10 where I'd like for it to blur to say 12 on second click and 14 on 3rd click and so on.


Could something like this work or is it possible?


{blurFilter:{blurX:currentBlurX +2, blurY:currentBlurY +2}});


Any input would be appreciated.



Link to comment
Share on other sites

Sure, you can just track that with a variable, kinda like:

var blur:int = 10;

function onClick():void {
    TweenLite.to(mc, 1, {blurFilter:{blurX:blur, blurY:blur}});
    blur += 2;   

Does that help?

  • Like 2
Link to comment
Share on other sites

Wonderful, was as simple as that. Thanks for the reply!

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