Flash blur action


/ Published in: ActionScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. _root.tweenBlur = function(my_mc, fromBlur, toBlur, duration, afterFunc){
  2. var blur:BlurFilter = new BlurFilter(fromBlur, fromBlur, 3);
  3. my_mc.filters = new Array(blur);
  4. blurTween = new Tween(blur, "blurX", _root.easeType, blur.blurX, toBlur, duration, true);
  5. blurTween.onMotionChanged = function() {
  6. blur.blurY = blur.blurX;
  7. my_mc.filters = new Array(blur);
  8. }
  9. if(afterFunc) blurTween.onMotionFinished = afterFunc; // This will run a function when the blur is complete
  10. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.