Glow effect using the AS

Date: 29.6.2009, 12:4    Total views: 9438

This, step by step, detailed action script lesson, will show you how to apply glow filter on any photo 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 photo into a flash stage.

Step 3

While the photo 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 photo_mc. See the picture below!



Step 5

Call the current layer photo. 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 photo and go to the AS panel (F9). After that, enter this code inside the actions panel:

import flash.filters.*;

var myGlow:GlowFilter = new GlowFilter();
myGlow.inner=true;
myGlow.color = 0x2a2626;
myGlow.blurX = 20;
myGlow.blurY = 20;
photo_mc.filters = [myGlow];

That's it!

Have a nice day!

Download source file (.fla)

  Digg it! Add this tutorial to del.icio.us! Furl it! Add this tutorial to reddit! Spurl it! Add this tutorial to technorati!
Share
ShareSidebar