James Ward wrote:
Hi all. I have encountered some strange behavior when I added a
dropShadow to a VBox which has a WipeDown / WipeUp effect on it. The
dropShadow doesn't wipe with the VBox. This can be seen by adding
dropShadow="true" to the cart VBox on the Samples -> Explorer -> UI
Patterns -> Overlay Demo. Am I using this wrong or is this a bug? If
it's a bug is there a known workaround? Thanks.

You'll have to toggle the visibility and the shadow programmatically.

function onEffectEnd(effect)
{
if (effect["show"])
cart.setStyle("dropShadow", true);
else
cart.visible = false;
}

function wipeCart(show:Boolean):Void
{
var effect:Effect = show ? new WipeDown() : new WipeUp();
effect.target = cart;
effect.duration = 300;
effect["show"] = show;
effect.listener = this;

if (show)
cart.visible = true;
else
cart.setStyle("dropShadow", false);

effect.playEffect();
}

<mx:VBox id="cart ... />
<mx:Button label="Show/Hide" click="wipeCart(!cart.visible)" />

Manish




Reply via email to