dMurphy Posted November 25, 2016 Share Posted November 25, 2016 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. Cheers Link to comment Share on other sites More sharing options...
GreenSock Posted November 25, 2016 Share Posted November 25, 2016 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? 2 Link to comment Share on other sites More sharing options...
dMurphy Posted November 28, 2016 Author Share Posted November 28, 2016 Wonderful, was as simple as that. Thanks for the reply! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now