我在Group容器中有一个FXG图形资产。它默认是不可见的。当我尝试淡入时,它会工作并淡入并在第一次淡出时很好,但第二次和90%的时间之后它会立即出现(不淡入)然后逐渐淡入其中(如果那讲得通)。
我正在使用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});
答案 0 :(得分:0)
这似乎与延迟属性有关。如果我删除延迟,它会正确淡入。
Tweener.addTween([image, imageExistsLabel, closeImageButton], {alpha:1.0, time:0.25, transition:"easeOutExpo", delay:0});