Note :Requiremet for this tut is Macromedia Flash8
Step1: Open New document in flash (Ctrl + N)
Step2: Select first frame, right-click and paste the below code in first frame
code contains explanations
import flash.filters.*;//importing all the filter class files
import mx.transitions.Tween;//importing all the tween class files
import mx.transitions.easing.*;
_root.createEmptyMovieClip("imageHolder", _root.getNextHighestDepth());//creating runtime movieclip to hold image
System.security.allowDomain("http://emiliewood.com/photos/july2005/17-july-05-flowers.jpg");//allowing flash to load files from other domain
//creating listerner object for movieclip loader class
var mcl_lis:Object = new Object();
//movieclip loader class to load external files
var mcl:MovieClipLoader = new MovieClipLoader();
//adding listener to moviecliploader class
mcl.addListener(mcl_lis);
//loading image file using moviecliploader class
mcl.loadClip("http://emiliewood.com/photos/july2005/17-july-05-flowers.jpg", _root.imageHolder);
//onloadinit function called once image loaded
mcl_lis.onLoadInit = function(target_mc:MovieClip) {
//tweening blur filter 5 -0 in 2 secs-- and applying dropshawdow using tween class
var myTween:Tween = new Tween(target_mc, "blur", Strong.easeInOut, 5, 0, 2, true);
myTween.onMotionChanged = function() {
target_mc.filters = [new BlurFilter(target_mc.blur, target_mc.blur, 1), new DropShadowFilter(1, 90, 0x000000, .8, 1, 1, 1, 1)];
};
};
1 comments:
wow works really well, good comments to be able to modify. Thanks!
Post a Comment