zoukankan      html  css  js  c++  java
  • Flex 4: 一个向左移动 像右移动的效果

    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
                   xmlns:s
    ="library://ns.adobe.com/flex/spark" 
                   xmlns:mx
    ="library://ns.adobe.com/flex/halo" 
                   width
    ="500" height="300">
        
    <s:layout>
            
    <s:BasicLayout/>
        
    </s:layout>

        
    <fx:Script>
            
    <![CDATA[
                protected function clickHandler(event:MouseEvent):void
                {
                    // TODO Auto-generated method stub
                    effect.end();
                    effect.xTo = test.x == 490 ? 200 : 490;
                    effect.play();
                }
            
    ]]>
        
    </fx:Script>

        
    <fx:Declarations>
            
    <!-- Place non-visual elements (e.g., services, value objects) here -->
            
    <s:Move id="effect" target="{test}"/>
        
        
    </fx:Declarations>
        
    <s:Border backgroundColor="0xff0000" backgroundAlpha="0.4" width="100%" height="100%">
            
    <s:layout><s:BasicLayout/></s:layout>
            
    <s:Panel id="test" title="我是移动的Panel" 
                     x
    ="200" y="5" width="290" height="290" 
                     backgroundColor
    ="0x00ff00"
                     click
    ="clickHandler(event)"/>
        
    </s:Border>
    </s:Application>
  • 相关阅读:
    第三方登录(QQ登录)开发流程详解
    网页优化方案
    linux中PHP链接MySQL主机127.0.0.1与localhost
    RSync实现文件备份同步
    网站攻击以及解决方案
    迎难而上,QPS提高22+倍
    新的一扇窗
    边缘计算开源平台
    高并发分布式计算-生产实践
    分布式UUID的生成
  • 原文地址:https://www.cnblogs.com/Fooo/p/1593711.html
Copyright © 2011-2022 走看看