import mx.transitions.Tween;
import mx.transitions.easing.*;
import flash.filters.BlurFilter;
var i=0;
var j=0;
_root.btn.onRelease=function(){
ball = new Tween(pic, "_x", easeType, 20, 400,1.5, true);
onEnterFrame = function () {
lvjing = new BlurFilter();
if(pic._x>=100 && pic._x<=300 )
{ for(i=0;i<50;i++)
{lvjing.blurX =i;
pic.filters = [lvjing];
}
}
else if
( pic._x<=350 && pic._x>300)
{ for(i;i>0;i--)
{lvjing.blurX =i;
pic.filters = [lvjing];
}
}
}
}
关键使用 new Tween(pic, "_x", easeType, 20, 400,1.5, true); 缓冲函数
lvjing = new BlurFilter(); 模糊函数