/ Published in: ActionScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
_root.tweenBlur = function(my_mc, fromBlur, toBlur, duration, afterFunc){ var blur:BlurFilter = new BlurFilter(fromBlur, fromBlur, 3); my_mc.filters = new Array(blur); blurTween = new Tween(blur, "blurX", _root.easeType, blur.blurX, toBlur, duration, true); blurTween.onMotionChanged = function() { blur.blurY = blur.blurX; my_mc.filters = new Array(blur); } if(afterFunc) blurTween.onMotionFinished = afterFunc; // This will run a function when the blur is complete }