0
我在Group容器中有一个FXG图形资产。它默认是不可见的。当我尝试淡入淡出时,它会在第一次但第二次淡入淡出时90%的时间立即显示出来(不淡入),然后淡入淡出(if这就说得通了)。虽然alpha设置为0,但FXG资产仍可见
我正在使用Tweener,所以它可能是tweener相关的问题,但我有两个其他组件,淡入淡出正确。
我猜Tweener在补间开始时拍摄每个对象的快照,并且FXG关闭按钮可见(但alpha未应用),然后从该图像淡入到最终图像。
MXML:
<s:Image id="image"
left="20" top="80"
width="620" height="300"
useHandCursor="true"
buttonMode="true"
backgroundColor="black"
backgroundAlpha="1"
click="handleClick(event)"/>
<fxg:RoundCloseButton id="closeImageButton" width="24" height="24" top="82" right="22"
useHandCursor="true"
buttonMode="true"
click="handleClick(event)"/>
代码:
image.alpha = 0;
image.visible = true;
closeImageButton.alpha = 0;
closeImageButton.visible = true;
imageExistsLabel.alpha = 0;
imageExistsLabel.visible = true;
Tweener.addTween([image, imageExistsLabel, closeImageButton], {alpha:1.0, time:0.25, transition:"easeOutExpo", delay:0.5});