我有一个移动效果,但是现在我将它放入并行合成效果中它不再有效。这是效果声明:
<s:Parallel id="slideToTheRightAnimation">
<s:Move id="slideToTheRightMove" target="{myComponent}" xFrom="0"
effectUpdate="trace('myComponent x=' + myComponent.x)"/>
</s:Parallel>
以下是组件定义:
<comp:OptionsPalette id="myComponent" width="350" height="115" y="160"
layoutDirection="{LocaleManager.layoutDirection}"
visible="false"
requestPaletteClose="closeME()"
depth="-1">
<comp:filters>
<skins:StandardShadow/>
</comp:filters>
</comp:OptionsPalette>
我在调用slideToTheRightAnimation play()方法之前正在设置xTo
属性。
答案 0 :(得分:0)
我找到了原因。我已将组件的深度设置为-1以低于其他组件。设置此项后,x属性始终返回NaN
。
将深度设置为0会导致移动效果再次起作用。不知道为什么会这样。我认为你可以将深度设置为负值,并且编译器没有抱怨并且组件正确显示(尽管它没有移动或动画)。也许我正在考虑AS2的深度问题???