Код:
import flash.display.BitmapData;
import flash.filters.BevelFilter;
import flash.filters.DropShadowFilter;
import flash.geom.Point;
var myBitmapData:BitmapData = new BitmapData(100, 80, true, 0xCCCCCCCC);
var mc:MovieClip = this.createEmptyMovieClip("mc", this.getNextHighestDepth());
mc.attachBitmap(myBitmapData, this.getNextHighestDepth());
var filter:DropShadowFilter = new DropShadowFilter(10,10,0,100,10,10,1,2,false,false,true);
mc.onPress = function() {
myBitmapData.applyFilter(myBitmapData, myBitmapData.rectangle, new Point(0, 0), filter);
}
Цитата из хелпа:
Цитата:
BevelFilter, DropShadowFilter, GlowFilter -- The destination image of these filters must be a transparent image. Calling DropShadowFilter or GlowFilter creates an image that contains the alpha channel data of the drop shadow or glow. It does not create the drop shadow onto the destination image. If you use any of these filters with an opaque destination image, an error code value of -6 is returned.
|
Перевести?
Поэтому юзаем copyPixels