이미지 흐리게 하기
import flash.filters.BlurFilter;
import mx.transitions.Tween;
import mx.transitions.easing.*;
this.createEmptyMovieClip("holder_mc", 10);
holder_mc.createEmptyMovieClip("img_mc", 20);
var mclListener:Object = new Object();
mclListener.onLoadInit = function(target_mc:MovieClip) {
target_mc._x = (Stage.width - target_mc._width) / 2;
target_mc._y = (Stage.height - target_mc._height) / 2;
var myTween:Tween = new Tween(target_mc, "blur", Strong.easeInOut, 0, 20, 3, true);
myTween.onMotionChanged = function() {
target_mc._parent.filters = [new BlurFilter(target_mc.blur, target_mc.blur, 1)];
};
myTween.onMotionFinished = function() {
myTween.yoyo();
}
};
var my_mcl:MovieClipLoader = new MovieClipLoader();
my_mcl.addListener(mclListener);
my_mcl.loadClip("http://www.helpexamples.com/flash/images/image1.jpg", holder_mc.img_mc);
import mx.transitions.Tween;
import mx.transitions.easing.*;
this.createEmptyMovieClip("holder_mc", 10);
holder_mc.createEmptyMovieClip("img_mc", 20);
var mclListener:Object = new Object();
mclListener.onLoadInit = function(target_mc:MovieClip) {
target_mc._x = (Stage.width - target_mc._width) / 2;
target_mc._y = (Stage.height - target_mc._height) / 2;
var myTween:Tween = new Tween(target_mc, "blur", Strong.easeInOut, 0, 20, 3, true);
myTween.onMotionChanged = function() {
target_mc._parent.filters = [new BlurFilter(target_mc.blur, target_mc.blur, 1)];
};
myTween.onMotionFinished = function() {
myTween.yoyo();
}
};
var my_mcl:MovieClipLoader = new MovieClipLoader();
my_mcl.addListener(mclListener);
my_mcl.loadClip("http://www.helpexamples.com/flash/images/image1.jpg", holder_mc.img_mc);
댓글