//1. You'll need these import statements at the very top of the actionscript panel of the 1st frame of the Main timeline.
import flash.display.Sprite;
import flash.filters.BitmapFilter;
import flash.filters.BitmapFilterQuality;
import flash.filters.BlurFilter;
/*Next I create a reusable function that accepts three parameters: The name of your Clip, How much to Blur the X, How much to Blur the Y*/
function BlurIt(ClipName,BlurXValue,BlurYValue) {
var blurX:Number=BlurXValue;
var blurY:Number=BlurYValue;
//Next Line -> Essence of the Blur Method:
var myBlur:BlurFilter= new BlurFilter;(blurX,blurY,BitmapFilterQuality.HIGH);
//attach the method to the Object (your movieclip)..
ClipName.filters=[myBlur];
}
//3. Blur Function ready for use.
BlurIt(ClipName,BlurX,BlurY);
//Example :
BlurIt(myNwee,20,20);
If you're copying the codes, you may exclude the '//' comments.
No comments:
Post a Comment