PDA

View Full Version : Drop Shadow



tpann
October 11th, 2007, 02:14 PM
I would like someone's help applying a drop shadow to a display object. I have several books and the Help to look at for direction but I am still unable to get it right. A nice simple block of code would be greatly appreciated.

Call the display object "thing." It's placed on the stage thus:


var thing:Loader = new Loader();
addChild(thing);
thing.load(new URLRequest(filename));


...where filename is "thing.swf". Hopefully that's enough information. Let me know if I need to give you more.

Thanks!

panel
October 11th, 2007, 06:40 PM
This should work


var dropShadow:DropShadowFilter = new DropShadowFilter( );
var filters:Array = [dropShadow];
sprite.filters = sampleFilters;

Michael Chen
October 11th, 2007, 06:47 PM
Try this...



import flash.filters.DropShadowFilter;

var thing:Loader = new Loader();
addChild(thing);
thing.load(new URLRequest(filename));

// Applies a drop shadow filter to "thing".
var dSF:DropShadowFilter = new DropShadowFilter();
thing.filters = new Array(dSF);