views:

158

answers:

1

In Flex I've got a component, which is based on a Canvas. It looks like this (I removed the <mx:Script> for better reading):

<mx:Canvas verticalScrollPolicy="off" showEffect="showFX" hideEffect="hideFX" horizontalScrollPolicy="off" creationComplete="doComplete()" xmlns:mx="http://www.adobe.com/2006/mxml" width="63" height="63">

<mx:Fade id="hideFX" alphaFrom="1" alphaTo="0" easingFunction="mx.effects.easing.Linear.easeIn" startDelay="0" duration="600" />
<mx:Fade id="showFX" alphaFrom="0" alphaTo="1" easingFunction="mx.effects.easing.Linear.easeIn" startDelay="0" duration="600" />

</mx:Canvas>

If I set customComponent.Visible to false, the component gets hidden (as expected). But doesn't trigger the hideFX at all. Am I doing something wrong? Or isn't this the correct way to use hideEffect and showEffect?

+1  A: 

Just off the top of my head, try binding the effects to the Canvas:

<mx:Canvas verticalScrollPolicy="off" showEffect="{showFX}" hideEffect="{hideFX}" ... >
Sly_cardinal
That solved the problem. Thanks a lot!!
MysticEarth