zoukankan      html  css  js  c++  java
  • flex 动画笔记

    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();
                }
  • 相关阅读:
    饮冰三年-人工智能-linux-03 Linux文件管理(权限管理+归档+压缩)
    饮冰三年-人工智能-linux-02 初始Linux
    饮冰三年-人工智能-linux-01通过VM虚拟机安装contes系统
    测试joinablequeue
    生产者消费者模型
    队列
    优化抢票
    昨日回顾
    抢票小程序
    守护进程
  • 原文地址:https://www.cnblogs.com/tiandi/p/3995418.html
Copyright © 2011-2022 走看看