请使用fp8查看~
制作一mc,修改实例名为myMC,加入如下代码~
import flash.filters.BlurFilter;
var blur:BlurFilter = new BlurFilter(5,5,3);
//初始化滤镜
var maxblurdistance:Number =5;
myMC.filters =[blur];
onMouseDown = function(){//在按下鼠标时响应~
tempx=_xmouse//记下鼠标位置
tempy=_ymouse
onEnterFrame=function(){
var dx =tempx - myMC._x;
var dy =tempy - myMC._y;
myMC._x+=dx/2
myMC._y+=dy/2//缓动
blur.blurX = Math.abs(dx/2);
blur.blurY = Math.abs(dy/2);//产生模糊~
myMC.filters =[blur];//追加滤镜
updateAfterEvent();
}
}