filter_list = new Array();
filter_list.push(new DropShadowFilter());
filter_list.push(new BlurFilter());
filter_list.push(new GlowFilter());
filter_list.push(new BevelFilter());
sourceBmp = BitmapData.loadBitmap("sun");
bmp_mc.attachBitmap(sourceBmp, 0);
my_btn.onRelease = function() {
var rnd1 = Math.floor(Math.random() * 4);
var rnd2 = Math.floor(Math.random() * 4);
my_mc.filters = [filter_list[rnd1], filter_list[rnd2]];
var rect = sourceBmp.generateFilterRect(sourceBmp.rectangle, filter_list[rnd1]);
var w = (rect.x < 0) ? rect.width - rect.x : rect.width;
var h = (rect.y < 0) ? rect.height - rect.y : rect.height;
if (targetBmp) targetBmp.dispose();
targetBmp = new BitmapData(w, h);
targetBmp.applyFilter(sourceBmp, rect, new Point(0, 0), filter_list[rnd1]);
bmp_mc.attachBitmap(targetBmp, 0);
};