Tweening Filters in flash:

After completing this tutiorial you can learn using MovieclipLoader class, and Tweening flash filters..

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"");//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
//loading image file using moviecliploader class
mcl.loadClip("", _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)];

Bookmark and Share


Anonymous said...

wow works really well, good comments to be able to modify. Thanks!


Recent Posts

Recent Visitors

Donate Me

About Me

My photo
Chennai, Tamil nadu, India
Nothing more to say about me.. Just a Action Script programmer / Flex developer having 4.5 years of experience.