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)

Apply blur filter on any image using the AS3

25.6.2009, 23:20    Total views: 7094

This, step by step, detailed action script lesson, will show you how to apply blur filter on any image using the AS3.





Example:




Step 1

Create a new flash document.



Step 2


Choose now File > Import > Import to stage (Ctrl+R) and import any image into a flash stage.

Step 3

While the image is still selected, hit F8 key (Convert to Symbol) to convert it into a Movie Clip Symbol.



Step 4

While the new made Movie Clip is still selected, go to the Properties Panel below the stage. On the left side, You will find the Instance name input field there. Call this Movie Clip image_mc. See the picture below!



Step 5

Call the current layer image. Double-click on its default name (Layer 1) to change it. Press Enter once you have typed in the new name!

Step 6

Select now the first frame of layer image and go to the AS panel (F9). After that, enter this code inside the actions panel:

import flash.filters.*;

var myBlur:BlurFilter = new BlurFilter();
image_mc.filters = [myBlur];

We're done now!

Test your movie (Ctrl+Enter) and enjoy!

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