Flash tutorials
Home 3D (2) Actionscripting (65) Animation (100) Audio (4) Drawing (7) Full flash sites (4) Getting Started (15) Navigation (25) Special Effects (52) Text Effects (38)

Glow Filter

6.8.2006, 20:29    Total views: 52724

Read this thoroughly explained, detailed action script tutorial and see how to apply glow filter on any object. This filter looks very nice and you can use it for some web elements. Using this action script lesson, you will also learn how to convert any object into a Movie Clip Symbol, how to create instance name, how to use action script panel... Let's start!

Example:



Step 1

Create a new Flash Document and draw any object or import any picture on the stage.





Step 2


Select the object or picture that you have just created or imported, and press F8 on the keyborad (Convert to Symbol), to convert it into a Movie Clip. Look at the picture below!



Step 3

While your new made Movie Clip is still selected, open the Properties Panel (Ctrl+F3) and under type: box_mc



Step 4

After that, click on the first frame of layer1 and paste this script:

box_mc.filters = [new flash.filters.GlowFilter()];
var dir:Number = 1;
box_mc.blur = 10;

box_mc.onEnterFrame = function() {
box_mc.blur += dir;
if ((box_mc.blur>=30) || (box_mc.blur<=10)) {
dir *= -1;
}

var filter_array:Array = box_mc.filters;
filter_array[0].blurX = box_mc.blur;
filter_array[0].blurY = box_mc.blur;
box_mc.filters = filter_array;
};

Test your Movie (Ctrl+Enter).

We're done! 

Bye!

Download source file (.fla)

Have questions about this tutorial?
Visit our friendly Community Forums!
Digg it! Add this tutorial to del.icio.us! Furl it! Add this tutorial to reddit! Spurl it! Add this tutorial to technorati!

Top tutorials

1. Advanced full flash site - Part 1
Total views: 221536

2. Water effect
Total views: 166041

3. Photo slide show
Total views: 153641

4. High-tech city animation
Total views: 151459

5. Special Picture Effect
Total views: 146247

Related links