PDA

View Full Version : What's the deal? setMask + DropShadowFilter = EVIL?


demerit
02-06-2007, 11:03 PM
OK, so I've troubleshooted and traced, and scoured the forums for hours...

When making an mc within an mc (visible and not visible) while the parent mc has DropShadowFilter and setMask applied to it, there's some spooky weirdness going on.

Could someone explain to me why this is jacked up? Is it just a bug with setMask? Is there something I'm doing wrong? Or is there a work-around. . .other than using a masking layer?

Spanks! :p


import flash.filters.DropShadowFilter;
function applyDropShadow(currPainting:Object) {
var dropShadow = new flash.filters.DropShadowFilter(2, 45, 0x000000, 0.4, 15, 15, 3, 3);
var dropFilter:Array = currPainting.filters;
dropFilter.push(dropShadow);
currPainting.filters = dropFilter;
}
this.container1_mc.setMask(this.masker_mc);
applyDropShadow(container1_mc);
this.container1_mc.btn1_mc.onPress = function() {
_root.container1_mc.box1_mc._visible = true;
_root.container1_mc.box2_mc._visible = false;
};
this.container1_mc.btn2_mc.onPress = function() {
_root.container1_mc.box2_mc._visible = true;
_root.container1_mc.box1_mc._visible = false;
};
stop();

demerit
02-07-2007, 04:21 PM
Well, I've figured out a work-around on my own.

Disable the drop shadow before the visibility changes and re-apply it after the visibility changes have been made.

Kinda feels like a cheap hack, but it works...

What I was hoping for was to be able to use the FuseKit's alphaTo, but then I'd have to have the drop-shadow disabled for however long I'd want the mc's to fade out/in (e.g., 0.25 seconds). Too long.

Anybody else have any thoughts, ideas, links to other threads?