Vanish

Categories

Twitter

Twitter Updates

    follow me on Twitter

    .

    29502
    解决Adobe flash player安装失败的最好方法
    有趣

    代码高亮

    Vanish posted @ 2009年5月12日 18:54 in 随笔 , 1951 阅读

     

    1. <?xml version="1.0" encoding="utf-8"?>
    2. <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    3.         layout="absolute"
    4.         creationComplete="initApp(event);">
    5. <mx:Button id="btn" label="Show Names"
    6.         click="showNames(event)"  x="216" y="176"/>
    7. <mx:Script>
    8.         <![CDATA[
    9.                 import mx.events.FlexEvent;
    10.                 private function initApp(evt:FlexEvent):void
    11.                 {
    12.                         btn.addEventListener(MouseEvent.CLICK,showNames);
    13.                         btn.addEventListener(MouseEvent.CLICK,showTitles);
    14.                
    15.                
    16.                 }
    17.                 private function showNames(evt:MouseEvent):void
    18.                  {
    19.                         var temp:Array =
    20.                                new Array("ddd","ssss","dsddsd");
    21.                         trace (temp.toString());
    22.                  }
    23.                  private function showTitles(evt:MouseEvent):void
    24.                  {
    25.                         var temp:Array = new Array("Director","Vice-Prresident","President","CEO");
    26.                         trace(temp.toString());
    27.                 
    28.                 
    29.                  }
    30.         ]]>
    31. </mx:Script>
    32. </mx:Application>
    33.  
    • 无匹配
    • 无匹配

    登录 *


    loading captcha image...
    (输入验证码)
    or Ctrl+Enter