Bevel image effect using the AS

Date: 26.6.2009, 16:29    Total views: 6528

Using this thoroughly explained, detailed action script 3 flash lesson, you will see how to create bevel image effect.













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 myBevel:BevelFilter = new BevelFilter();
myBevel.type = BitmapFilterType.FULL;
myBevel.distance = 10;
myBevel.highlightColor = 0x993300;
myBevel.shadowColor = 0xFFFF00;
myBevel.blurX = 20;
myBevel.blurY = 20;
image_mc.filters = [myBevel];

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