标签:style blog color io os 使用 ar sp div
1、不涉及到组件宽度和高度变化的
如果类似showEffect等属性不好使的,直接使用hideEffect.end(); showEffect.play();等这样的用法。
2、涉及到组件宽度和高度变化的
在执行动画期间,需要把显示区域的visible设置成false。
<s:Parallel duration="500" id="showEffect" target="{window}" effectEnd="sEffectEnd()"> <s:children> <s:Move xFrom="{FlexGlobals.topLevelApplication.width-50}" yFrom="50" xTo="{FlexGlobals.topLevelApplication.width/2-375}" yTo="{FlexGlobals.topLevelApplication.height/2-275}" /> <s:Resize widthFrom="0" widthTo="750" heightFrom="0" heightTo="550"/> </s:children> </s:Parallel> <s:Parallel duration="500" id="hideEffect" target="{window}" effectEnd="hEffectEnd()"> <s:children> <s:Move xTo="{FlexGlobals.topLevelApplication.width-50}" yTo="50" /> <s:Resize widthTo="0" heightTo="0"/> </s:children> </s:Parallel>
protected function basewidget1_creationCompleteHandler():void { content.visible=false; hideEffect.end(); showEffect.play(); } private function sEffectEnd():void { content.visible=true; } private function hEffectEnd():void { PopUpManager.removePopUp(window); AppEvent.dispatch(AppEvent.WIDGET_CLOSE,widgetId); } private function closeHandler():void { content.visible=false; showEffect.end(); hideEffect.play(); }
标签:style blog color io os 使用 ar sp div
原文地址:http://www.cnblogs.com/tiandi/p/3995418.html