【发布时间】:2010-07-05 14:41:10
【问题描述】:
我正在尝试做一个简单的动画。我想在creationcomplete中淡入并调整列表的大小。我的问题是我总是可以在元素动画开始之前看到元素闪烁。换句话说,用户将看到元素出现 1 秒->然后淡入并调整动画大小。我希望这里的任何人都可以帮助我。谢谢...
我的代码。
作为:
protected function compList_creationCompleteHandler(event:FlexEvent):void
{
compinfoResult.token = getCompList.compinfo();
compinfoResult.addEventListener(ResultEvent.RESULT, completeLoading);
function completeLoading(event:ResultEvent):void{
fadeList.play(); //the animation will fire when the List get the result from the server...
scaleList.play();
}
}
mxml
<s:Scale id="scaleList" scaleXFrom="0" scaleXTo="1" scaleYFrom="0"
scaleYTo="1" duration="500" target="{compList}" />
<s:Fade id="fadeList" alphaFrom="0" alphaTo="1" target="{compList}" />
<s:List id="compList"
width="280"
height="560"
x="0"
y="0"
alpha="0"
creationComplete="compList_creationCompleteHandler(event)"
itemRenderer="itemRenderer.compListItemRenderer"
change="compList_changeHandler(event)"/>
【问题讨论】:
标签: apache-flex animation