??xml version="1.0" encoding="utf-8" standalone="yes"?>91xxx在线观看,国产丶欧美丶日本不卡视频,免费成人动漫http://www.aygfsteel.com/xvridan/无衣的笔?/description>zh-cnSun, 18 May 2025 19:25:46 GMTSun, 18 May 2025 19:25:46 GMT60ActionScript3.0事g处理http://www.aygfsteel.com/xvridan/archive/2007/04/23/111652.html无衣无衣Mon, 23 Apr 2007 11:36:00 GMThttp://www.aygfsteel.com/xvridan/archive/2007/04/23/111652.html
事g调用回调函数
<mx:Button id="myButton" click="myFunction(event)"/>

事g侦听?br>
事g侦听器让一个对象(UC侦听对象Q接收由其他对象Q称q播对象Q生成的事g。广播对象注册侦听对象以接收该广播器对象生成的事件?br>首先使用addEventListenerҎ注册侦听对象Q?br>侦听对象.addEventListener(type:String, listener:Function)
type 参数指出你要监听的事件类型,比如"enterFrame". 然而自p入这些字W串Ҏ出错Q最好的办法是调用Eventcȝ静态成员属性:导入Event c,调用addEventListener ҎQ?br>addEventListener(Event.ENTER_FRAME, onEnterFrame);
W二个参数onEnterFrame,指向cM定义的回调函?回调函数定义了对事g处理)Q该函数需要传递进EVENT的一个实例:
private function onEnterFrame(event:Event) {
    //处理事g的代?br>}

下面是事件侦听器的例?br>
 1 <?xml version="1.0" encoding="utf-8"?>
 2 <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="createListener();">
 3     <mx:Script>
 4         <![CDATA[
 5         
 6         import flash.events.MouseEvent;
 7         
 8         public function createListener():void {
 9             btnConvert.addEventListener(MouseEvent.CLICK, convertCurrency);
10         }
11     
12         public function convertCurrency(e:MouseEvent):void {
13             var rate:Number = 120;
14             var price:Number = Number(txtPrice.text);
15             if (isNaN(price)) {
16                     lblResults.text = "Please enter a valid price.";
17             } else {
18                 price = price * rate;
19                 lblResults.text = "Price in Yen: " + String(price);
20             }
21         }
22         ]]>
23     </mx:Script>
24 
25     <mx:Panel x="20" y="20" width="450" height="150" layout="absolute"
26         title="Currency Converter">
27         <mx:Label x="25" y="37" text="Price in Dollars"/>
28         <mx:Label x="120" y="65" id="lblResults"/>
29         <mx:TextInput x="120" y="35" id="txtPrice"/>
30         <mx:Button x="290" y="35" label="Convert to Yen" id="btnConvert" />
31     </mx:Panel>
32 </mx:Application>
按键btnConvert对象在第9行注册了一个侦听器Q该侦听器负责侦听鼠标单MӞ事g处理被定义在convertCurrencyQ)Ҏ内?br>



无衣 2007-04-23 19:36 发表评论
]]>
Flex之MXML介绍http://www.aygfsteel.com/xvridan/archive/2007/04/23/112463.html无衣无衣Mon, 23 Apr 2007 06:56:00 GMThttp://www.aygfsteel.com/xvridan/archive/2007/04/23/112463.html

MXML介绍

一个简单程?/p>

~译MXML为SWF文g

MXML标签与ActionScriptcȝ关系

理解FlexE序l构

水^有限Q小心参?/span>

下蝲地址




无衣 2007-04-23 14:56 发表评论
]]>
Flex怎样工作http://www.aygfsteel.com/xvridan/archive/2007/04/23/112856.html无衣无衣Mon, 23 Apr 2007 00:15:00 GMThttp://www.aygfsteel.com/xvridan/archive/2007/04/23/112856.html
创徏和运行程?br>数据q接
Flash Player安全讄
FlexE序布局
使用事g和行?br>l你的程序加个页?br>开始Flex

水^有限Q小心勿?br>
׃旉和能力的原因Q许多地Ҏ直接译过来的Q没有润饰?br>
下蝲地址


无衣 2007-04-23 08:15 发表评论
]]>
Flex入门介绍及相兌?/title><link>http://www.aygfsteel.com/xvridan/archive/2007/04/20/112210.html</link><dc:creator>无衣</dc:creator><author>无衣</author><pubDate>Fri, 20 Apr 2007 07:17:00 GMT</pubDate><guid>http://www.aygfsteel.com/xvridan/archive/2007/04/20/112210.html</guid><description><![CDATA[看一下网l的<a target="_blank" >Flexhttp://www.deepcast.net/wiki/ow.asp?Flex</a><br>接着看看<a target="_blank" >Macromedia Flex 标记语言?/a>q个地址的内容一P只是有图?<a target="_blank" ><strong>Macromedia Flex 标记语言?/strong></a><br><br><strong>Flex的相兌源:</strong><br> <table id="Listing" class="Listing" border="0" cellpadding="0" cellspacing="0"> <tbody> <tr> <td> 中国Flash技术中?/td> <td> <a id="Results_rprSelectionList_ctl01_LinkTitle" class="titlelink">http://www.flashtc.com/index.asp</a> </td> </tr> <tr class="Alt"> <td> |经之Flex </td> <td> <a id="Results_rprSelectionList_ctl02_Hyperlink1" class="titlelink">http://www.deepcast.net/wiki/ow.asp?Flex</a> </td> </tr> <tr> <td> 黑羽天 </td> <td> <a id="Results_rprSelectionList_ctl03_LinkTitle" class="titlelink">http://www.kingda.org/blog/</a> </td> </tr> <tr class="Alt"> <td> Flash帝国 </td> <td> <a id="Results_rprSelectionList_ctl04_Hyperlink1" class="titlelink">http://blog.5d.cn/team/FLASHEmp.aspx</a> </td> </tr> <tr> <td> webstudio </td> <td> <a id="Results_rprSelectionList_ctl05_LinkTitle" class="titlelink">http://www.webstudio.com.cn</a> </td> </tr> <tr class="Alt"> <td> RIA技术专? </td> <td> <a id="Results_rprSelectionList_ctl06_Hyperlink1" class="titlelink">http://tech.csai.cn/zt/RIA/index.htm</a> </td> </tr> <tr> <td> Y.X.Shawn's Blog </td> <td> <a id="Results_rprSelectionList_ctl07_LinkTitle" class="titlelink">http://blog.ezse.com/</a> </td> </tr> <tr class="Alt"> <td> 5d </td> <td> <a id="Results_rprSelectionList_ctl08_Hyperlink1" class="titlelink">http://www.5d.cn/</a> </td> </tr> <tr> <td> Dreamer's Blog </td> <td> <a id="Results_rprSelectionList_ctl09_LinkTitle" class="titlelink">http://www.zhuoqun.net/</a> </td> </tr> <tr class="Alt"> <td> OpenLaszlo的中文教E中? </td> <td> <a id="Results_rprSelectionList_ctl10_Hyperlink1" class="titlelink">http://blog.csdn.net/lwz7512/</a></td> </tr> <tr> <td align="left" valign="middle">火柴工作?/td> <td align="left" valign="middle"><a target="_blank" > http://www.hcxm.cn/blog2/default.asp</a></td> </tr> </tbody> </table> <br> <img src ="http://www.aygfsteel.com/xvridan/aggbug/112210.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/xvridan/" target="_blank">无衣</a> 2007-04-20 15:17 <a href="http://www.aygfsteel.com/xvridan/archive/2007/04/20/112210.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>函数有感http://www.aygfsteel.com/xvridan/archive/2007/04/17/111374.html无衣无衣Tue, 17 Apr 2007 10:24:00 GMThttp://www.aygfsteel.com/xvridan/archive/2007/04/17/111374.htmlAdobe Flex 2: Training from the Source上面有这么一D话Q?Objects consist of characteristics that describe them, called properties, and behaviors that describe what they can do or what can be done to them, called methods. Properties are just variables attached to an object and methods are functions attached to an object. "
Ҏ是对象的责QQ这一观点我最早在《设计模式解析(W二版、中文版Q》里得知的,那里引用Martin Fowler的话_对象在概念层ơ上是一l责仅R当时我对这一观点大ؓ感叹Q因为我W一ơ领悟了对象的这一层含义,而不是仅是对象是cȝ实例、类是相同属性和行ؓ的集合?br>p是二把刀我对"methods are functions attached to an object"不理解?#8220;Ҏ是依附在对象上的函?#8221;Q如果这栯句话直和没说没有区别。查了function后,发现其有职责的含义。外国h应该在vfuntion个名字的时候,把职责q个含义加进M。而我则从中学数学课中认识它后Q知道函数是l它输入了东西然后会得到个东西的东西。ƈ没有更深入的和功能联pd一赗看来从外国来的东西把他直接译成中文是会损׃部分东西的。比如说Rails用到Martin Fowler的Active Record被译成活动记录,老是觉得有着异样。呵呵,有能力还是要看原版书?br>
?Adobe Flex 2: Training from the Sourceq本书,写的太细Q一句话能说的,要解释好几句Q吱吱吖?.....真受不了

无衣 2007-04-17 18:24 发表评论
]]>
Flex 容器http://www.aygfsteel.com/xvridan/archive/2007/04/14/110620.html无衣无衣Sat, 14 Apr 2007 06:58:00 GMThttp://www.aygfsteel.com/xvridan/archive/2007/04/14/110620.html

VBox

子垂直排列Q每一个子U在前一个子U的下面

HBox

子水^排列Q每一个子U在前一个子U的右面

Canvas

开发者可以通过x,y指定子位置。如果没有指定,所有的子都被攄于容器的左上角?/p>

Application

能设|其属性像VBox、HBox、Canvas的容器?/p>

Tile

以多行或多列布置子。所有Tile的格大小相同。Flex安排Tile容器在一个正方Ş的表格里Q每个格攄一个子U?/p>

Panel

Box容器的子c,Panel容器可以通过讄layout属性做为HBox、VBox或Canvas容器Q默认设|layoutQ?absolute"QPanel容器的行为就像Canvas容器一?。除此之外,该容器包含一个标题栏、一个标题、一个边框及其子U?/p>

ControlBar

ControlBar容器控件置于Panel或TitleWindow容听下边~。通过指定属性,ControlBar容器可以像HBox或VBox一栯行布局Q默认ؓHorizontalQ?/p>

ApplicationControlBar

讄属性可以其像HBox或VBoxq行布局Q默认ؓHorizontalQ?font face="Times New Roman, serif">ApplicationControlBar 容器容纳提供全局D和应用程序命令的lg, q可以停靠在 Application 容器的上边缘?




无衣 2007-04-14 14:58 发表评论
]]>
Flex入门教程http://www.aygfsteel.com/xvridan/archive/2007/04/14/110617.html无衣无衣Sat, 14 Apr 2007 03:07:00 GMThttp://www.aygfsteel.com/xvridan/archive/2007/04/14/110617.htmlq是Adobe|站中文的快速入门的教程Q每ơ访问觉得好慢,所以做成了PDF了。花半个时览一下,能快速的了解FlexQ还是值得一看的?br>下蝲QFlex入门教程



无衣 2007-04-14 11:07 发表评论
]]>
Eclipse 热键http://www.aygfsteel.com/xvridan/archive/2007/03/24/106023.html无衣无衣Sat, 24 Mar 2007 02:26:00 GMThttp://www.aygfsteel.com/xvridan/archive/2007/03/24/106023.html阅读全文

无衣 2007-03-24 10:26 发表评论
]]>
E序员境界(摘自《程序员?007.2 作者:郭安定)http://www.aygfsteel.com/xvridan/archive/2007/03/23/105831.html无衣无衣Fri, 23 Mar 2007 06:41:00 GMThttp://www.aygfsteel.com/xvridan/archive/2007/03/23/105831.html    五流E序员关心的是用什么工具可以生什么结果,q逐他听过最新、最好、最旉的技术,沉浸于一些小的练习,却很走牙塔和客h市场q行真正的沟通,甚至完成大型的真实案例?br />四流E序员比整合和管?br />    四流E序员比前者更兛_在什么地方用什么,他的心里攄集成各种技术的地图Q而不偏向单一工具或技术,他在乎运作一场战役的风险Q还有资金成本的考量Q包含开发时间、维护难易、用户培训或是市场推q쀦?br />三流E序员比创意和设?br />    三流E序员不仅要求把事情“做完”,同时要求自己把事情“做好”,他的作品里充满着感动和生命,即好几q以后重新来q,你依然会觉得那些创意和设计,H破了时I限Ӟ只能模仿无法取代?br />二流E序员比沟通和性格
    二流E序员蟩脱工P比h际沟通,他知道怎样和老板沟通,怎样和同事沟通,也知道怎样和客h通他有一个成熟ƈ且稳定的性格Q让M他在一起做事都有安全感Qƈ且感到快乐?br />一程序员比态度和方?br />    一程序员比的是学习态度和方法,包括对自我控制的能力Q也是U律Q我们不看他做出来什么事Q而是看他准备怎么dQ包含解决问题需要的旉Q还有学习新事物的方法?br />    只要他掌握了适合他自q学习态度和方法,那么他可以从M叶刻开始新的学习,q且展现最好的l果Q至于现在会不会Q懂不懂都不重要Q因为只要他惌他就随时可以要,也能要得到?br />E序员比思想和素?br />    E序只是语言的表qͼ而语a则是思想的泽点{?br />    E序员不仅改变我们的行ؓQ也企图改变我们的思想。你不需要从E序员的代码判断他的素质Q而是从他写的字、他说的话去感受他、因为没有那个思想C了那个境界?br />



无衣 2007-03-23 14:41 发表评论
]]>
也谈在Java中调用其它的E序(?作者muiltmeta)http://www.aygfsteel.com/xvridan/archive/2007/03/14/103800.html无衣无衣Wed, 14 Mar 2007 07:24:00 GMThttp://www.aygfsteel.com/xvridan/archive/2007/03/14/103800.html 原文出处Q?a target="_blank" >http://blog.csdn.net/muiltmeta/archive/2002/05/08/16660.aspx

前一D|间看了《程序员》第 3 ?/span> Java 专家门诊中怎样调用其它的程序,我把其解{代码放C个程序中Q如下示Q?/span>

import java.lang.*;

 

public class runProg{

public static void main(String[] args){

       try{

         Runtime rt=Runtime.getRuntime();

         rt.exec("NotePad");

       }catch(Exception e){}

}

}

 

 

 

 

 

 

 

 

 

 

 

 


在命令符下编译运行,直接调用了记事本应用E序Q没有Q何问题?/span>

但在囑Ş用户的应用程序中Q就不能~译Q代码示例如下:

  void jButton1_actionPerformed(ActionEvent e) {

    // 下是解答代码

try{

       Runtime rt=Runtime.getRuntime();

       rt.exec("NotePad");

    }catch(Exception e){

}

// 上是解答代码

  }

 

 

 

 

 

 

 

 

 

 

 


׃面的代码而言Q只是说明了调用其它E序的基本方法,但是q段代码Ҏ不能被编译过去,?/span> Jbuilder 中的~译错误如下Q?/span>

"Frame2.java": Error #: 469 : variable e is already defined in method jButton1_actionPerformed(java.awt.event.ActionEvent) at line 50, column 18

 

 

 

 


看到q个~译错误也许认ؓ是按钮的事g定义错误Q实际上?/span> AWT ?/span> Component 的事件是U程安全U的Q不允许直接使用另外q程或线E,?/span> Swing 中的lg是从 AWT 中承来的,所以也不允许直接用。解军_法只有用一个新U程。代码如下示Q?/span>

  void jButton1_actionPerformed(ActionEvent e) {

    //must be use a new thread.

    Thread t = new Thread(new Runnable(){

    public void run(){

       try {

        Runtime rt = Runtime().getRuntime();

        rt.exec(“notepad?;

        } catch (IOException e) {

        System.err.println("IO error: " + e);

      }

    }

    });

    t.start();

 

  }

但是q段代码q是不能被编译,错误提示如下Q?/span>

"Frame1.java": Error #: 300 : method Runtime() not found in anonymous class of method jButton1_actionPerformed(java.awt.event.ActionEvent) at line 74, column 22 ?/span>

 

 

 

 


看到q段代码Q认为没有发?/span> Runtime() Q或者没有包?/span> Runtime 所在的包。但实际上是 java 每个 Application 都有一个自q Runtime Q所以不允许昑ּ声明和用另外一个。其实,许多文章也都是这么介l的。在q里必须使用 Process 来启用另外一个进E?/span> Runtime 。代码示例如下:

  void jButton1_actionPerformed(ActionEvent e) {

    //must be use a new thread.

    Thread t = new Thread(new Runnable(){

    public void run(){

      try {

        //String[] arrCommand = {"javaw", "-jar", "d:/Unicom/Salary/Salary.jar"};

              // Process p = Runtime.getRuntime().exec(arrCommand);

        Process p = Runtime.getRuntime().exec("notepad");

        p.waitFor();

        System.out.println("return code: " + p.exitValue());

      } catch (IOException e) {

        System.err.println("IO error: " + e);

      } catch (InterruptedException e1) {

        System.err.println("Exception: " + e1.getMessage());

      }

    }

    });

    t.start();

 

  }

q行后,点击 jButton1 调用?/span> Windows 中的C本应用程序。这里,新线E用了 Runnable 接口Q这是一U常用的技巧。另外,q必要捕获 IOException ?/span> InterruptedException 两个异常。对于调用带有参数的复杂E序Q要使用字符串数l代替简单的字符Ԍ我在上面的代码注释了?/span>



无衣 2007-03-14 15:24 发表评论
]]>
վ֩ģ壺 | ΢ɽ| Դ| ɳƺ| ɽ| | | Ϻ| ɽ| ɿ| | | | | | | ƽ| | | ³ľ| ԫ| ˫| | Ӵ| ݳ| | | | | ԭ| ƽ̶| | | | | | ʡ| | ɽ| ȫ| Ƽ|