Mega Code Archive
Define a BlurFilter and the animation on that filter
import spark.effects.*;
import spark.filters.BlurFilter;
import spark.effects.animation.*;
private var blurFilter:BlurFilter;
private var blurAnim:AnimateFilter;
private var smpX:SimpleMotionPath;
private var smpY:SimpleMotionPath;
private function initApp():void {
blurFilter = new BlurFilter();
blurAnim = new AnimateFilter(btn1, blurFilter);
smpX = new SimpleMotionPath("blurX",0,20);
smpY = new SimpleMotionPath("blurY",0,20);
blurAnim.motionPaths = Vector.([smpX,smpY]);
}
private function doBlurSample():void {
blurAnim.repeatCount = 0;
blurAnim.repeatBehavior = RepeatBehavior.REVERSE;
blurAnim.play();
}
private function stopAnimation():void {
blurAnim.stop();
}