加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

flex transition示例

发布时间:2020-12-15 05:01:04 所属栏目:百科 来源:网络整理
导读:?xml version="1.0" encoding="utf-8"?mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="308" height="210"mx:Script ![CDATA[ import mx.effects.easing.Bounce; ]]/mx:Scriptmx:transitions mx:Transition fromState="
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="308" height="210">
<mx:Script>
    <![CDATA[
        import mx.effects.easing.Bounce;
    ]]>
</mx:Script>
<mx:transitions>
    <mx:Transition fromState="*" toState="*">
        <mx:Parallel targets="{[loginPanel,registerLink,loginButton,confirm]}"> <!--是targets,不是target-->
            <mx:Resize duration="500" easingFunction="Bounce.eaSEOut" />
            <mx:Sequence target="{confirm}">
                <mx:Blur duration="200" blurYFrom="1.0" blurYTo="20.0"/>
                <mx:Blur duration="200" blurYFrom="20.0" blurYTo="1.0"/>
            </mx:Sequence>
        </mx:Parallel>
    </mx:Transition>
</mx:transitions>
<mx:states>
    <mx:State name="Register" basedOn="">    <!--是name,不是id-->
        <mx:AddChild relativeTo="{loginForm}" position="lastChild" creationPolicy="all">
            <mx:FormItem id="confirm" label="Confirm:">
                <mx:TextInput/>
            </mx:FormItem>
        </mx:AddChild>
        <mx:SetProperty target="{loginPanel}" name="title" value="User Register--And8.net"/>
        <mx:SetProperty target="{loginButton}" name="label" value="Register"/>
        <mx:RemoveChild target="{registerLink}"/>
        <mx:AddChild relativeTo="{space1}" position="before">
            <mx:LinkButton label="Login Now!" click="currentState=''"/>
        </mx:AddChild>
    </mx:State>
</mx:states>
<mx:Panel id="loginPanel" title="User Login--And8.net" horizontalScrollPolicy="off" verticalScrollPolicy="off" x="10" y="10" borderColor="#00ff00">
    <mx:Form id="loginForm">
        <mx:FormItem label="Name:">
            <mx:TextInput/>
        </mx:FormItem>
        <mx:FormItem label="Password:">
            <mx:TextInput/>
        </mx:FormItem>
    </mx:Form>
    <mx:ControlBar>
        <mx:LinkButton label="Need to Register?" id="registerLink" click="currentState='Register'"/>
        <mx:Spacer width="100%" id="space1"/>
        <mx:Button id="loginButton" label="Login"/>
    </mx:ControlBar>
</mx:Panel>
   
</mx:Application>

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读