当组件可见属性以编程方式设置为 false 时,不会触发 hideEffect
在 Flex 中,我有一个基于 Canvas 的组件。 它看起来像这样(为了更好地阅读,我删除了
):
<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>
如果我将 customComponent.Visible
设置为 false
,组件被隐藏(如预期)。但根本不会触发 hideFX
。我做错了什么吗?或者这不是使用 hideEffect 和 showEffect 的正确方法?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
就在我的脑海中,尝试将效果绑定到
Canvas
:Just off the top of my head, try binding the effects to the
Canvas
: