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>
  • 相关阅读:
    Java IO流 简介
    Centos8安装java部署环境
    RedisTemplate
    手把手教windows上安装linux虚拟机及环境配置
    使用Swagger2构建 RESTful API文档
    VMware 安装 Centos 7 虚拟机配置网络
    别再写满屏的 try catch 了
    isEmpty 和 isBlank 的用法区别
    SpringBoot 中必须掌握的45个注解
    数组的栈方法
  • 原文地址:https://www.cnblogs.com/Fooo/p/1593711.html
Copyright © 2011-2022 走看看