flex4小特效
<s:transitions> <s:Transition fromState="loginState" toState="portalState"> <s:Sequence> <s:Parallel target="{employeeOfTheMonth}"> <s:Fade target="{login}"/> <s:Resize target="{employeeOfTheMonth}" widthFrom="278" widthTo="178"/> <s:Move target="{employeeOfTheMonth}" xFrom="336" xTo="24"/> </s:Parallel> <s:RemoveAction target="{login}"/> <s:Parallel targets="{[search,cafeteria,monthly]}"> <s:AddAction/> <s:Fade/> <s:Move target="{employeeOfTheMonth}"/> <s:Move target="{search}" xFrom="-166"/> <s:Move target="{cafeteria}" yFrom="-329"/> <s:Move target="{monthly}" xFrom="833"/> </s:Parallel> </s:Sequence> </s:Transition>
<s:Transition fromState="portalState" toState="loginState"> <s:Sequence> <s:Parallel> <s:Fade targets="{[search,monthly]}"/> <s:Resize target="{employeeOfTheMonth}" ?widthFrom="178" widthTo="278"/> <s:Move target="{employeeOfTheMonth}" xFrom="24" xTo="336"/> </s:Parallel> <s:AddAction target="{login}"/> <s:Fade target="{login}"/> </s:Sequence> </s:Transition> </s:transitions> 这个是登录进去后Panel从不同的方向移动进来。 <fx:Declarations>
<!-- 将非可视元素(例如服务、值对象)放在此处 -->
<s:Sequence id="shark" target="{login}" duration="60">
<s:Move xBy="10"/>
<s:Move xBy="-10"/>
<s:Move xBy="10"/>
<s:Move xBy="-10"/>
<s:Move xBy="10"/>
<s:Move xBy="-10"/>
<s:Move xBy="10"/>
</s:Sequence>
</fx:Declarations>
?
shark.play(); ?左右晃动的特效
<s:states>
<s:State name="portalState"/>
<s:State name="loginState"/>
</s:states>
两种状态 初始状态?currentState="loginState"
点击登录的时候,输入用户名和密码,如果不正确,晃动,正确就将状态改为 currentState = 'portalState';
?
在HTML+JS中,做这样的事很麻烦,搬到FLEX中,很简单很简单。
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |