Toxiclab.org

Drop shadow photo effect using the AS

26.6.2009, 12:32
Submited in: Flash | Total Views: 12404

Using this thoroughly explained, detailed action script 3 flash lesson, you will see how to apply drop shadow effect on any photo.








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 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 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 myShadow:DropShadowFilter = new DropShadowFilter();
myShadow.distance = 10;
myShadow.color = #63C732;
myShadow.blurX = 10;
myShadow.blurY = 10;
myShadow.quality = 3;
photo_mc.filters = [myShadow];

We're done now!

Test your movie (Ctrl+Enter) and enjoy!

Download example

Are you a website owner?
Click here to register and submit your tutorials!

Browse by category


Most popular tutorials