Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Flex ѧϰ±Ê¼£Ö®1 flexµÄʼþ(1)

Adobe Flex 3 Help > Flex Programming Elements > Using Events
Adobe Flex 3 Help
 
Flex Programming Elements / Using Events
Using events
Using events in Flex is a two-step process. First, you write a function or class method, known as an event listener or event handler, that responds to events. The function often accesses the properties of the Event object or some other settings of the application state. The signature of this function usually includes an argument that specifies the event type being passed in.
The following example shows a simple event listener function that reports when a control triggers the event that it is listening for:
<?xml version="1.0"?>
<!-- events/SimpleEventHandler.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="initApp();">
<mx:Script><![CDATA[
import mx.controls.Alert;
private function initApp():void {
b1.addEventListener(MouseEvent.CLICK, myEventHandler);
}
private function myEventHandler(event:Event):void {
Alert.show("An event occurred.");
}
]]></mx:Script>
<mx:Button id="b1" label="Click Me"/>
</mx:Application>
As you can see in this example, you also register that function or class method with a display list object by using the addEventListener() method.
Most Flex controls simplify listener registration by letting you specify the listener inside the MXML tag. For example, instead of using the addEventListener() method to specify a listener function for the Button control's click event, you specify it in the click attribute of the <mx:Button> tag:
<?xml version="1.0"?>
<!-- events/SimplerEventHandler.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script><![CDATA[
import mx.controls.Alert;
private function myEventHandler(event:Event):void {
Alert.s


Ïà¹ØÎĵµ£º

Flex ʵÏÖÊó±êÊÖÊÆ ÎÞÂë );

ÉùÃ÷£º×Ô¼ºÏëµÄ¡¢Ð´µÄ¶«Î÷£¬×ªÔØÇë×¢Ã÷³ö´¦£» ²»ÒªÏòÎÒÒª´úÂ룻 from CSDN ID: wander000
Ä¿µÄ£ºÔÚ×öС³ÌÐòʱ£¬ÏÔʾһЩÖØÒªµÄÊý¾ÝÈçÕʺÅÃÜÂëµÈ£¬²»ÏëÈñðÈËÖ±½Ó¿´µ½£¬ÔÚÖ¸¶¨×é¼þÉÏ°´¹æ¶¨ºÃµÄ¹ì¼£»Î¶¯Êó±ê²ÅÏÔʾ¡£
ÎÊÌ⣺һ¡¢Ö±½Ó´ò¿ªÊý¾Ý¿â²»¾Í¿´µ½Ã÷ÂëÁË£¿¶þ¡¢ÔõôÅжÏÊó±ê¹ì¼£µÄÐÎ×´£¿
½â¾ö£ºÒ»¡¢Êý¾Ý¿â´æȡʱÓÃÉÏ¼Ó ......

java¿ª·¢ÈËԱΪʲôҪѧϰflexºÍblazeds

±¾ÎÄÁÐÊöÁË13¸öJava³ÌÐòÔ±Ó¦µ±Ñ§Ï°FlexºÍBlazeDSµÄÀíÓÉ£¬ÌÖÂÛ ÁËΪʲôFlex½áºÏBlazeDSÊÇ¿ª·¢RIAµÄ×î¼Ñ×éºÏÖ®Ò»¡£ÎÞ ÂÛÊǸ߶Ƚ»»¥µÄÍøÕ¾»¹ÊÇÒÔJavaΪºó¶ËµÄÆóÒµÓ¦Óã¬ÕâÏî×éºÏ¶¼ÊÇ×î¼ÑÑ¡ÔñÖ®Ò»¡£¸üÖØÒªµÄÊÇ£¬ÕâÏî×éºÏÄÜͬʱΪ¿ª·¢Ô±ºÍÆóÒµ´øÀ´¸ß»Ø±¨£¨ROI£©¡£
ÔÚ²ûÊöJava³ÌÐòÔ±Ó¦µ±Ñ§Ï°BlazeDSµÄ13ÌõÀíÓÉʱ£¬ÎÒÒÔÒ»¸ö¼ÙÏëµ ......

12ÌõÓÐÓõÄFlex´úÂë

1.¸´ÖÆÄÚÈݵ½ÏµÍ³¼ôÌù°å 
System.setClipboard(strContent);
2.¸´ÖÆÒ»¸öArrayCollection
   //dummy solution( well, it works ) 
   var bar:ArrayCollection = new ArrayCollection(); 
   for each ( var i:Object in ac ){ 
       bar.a ......

Flex ÓÃGridʵÏÖÀàËÆÓÚHtmlµÄϸÏß±í¸ñ

ÎÒÃÇÔÚÓÃFlex½øÐпª·¢µÄʱºò£¬ÓÐʱºòÐèҪʵÏÖÏñhtml ϸÏß±í¸ñµÄÄÇÖÖЧ¹û£¬Ô­ÀíºÜ¼òµ¥£¬µ«ÊÇÐèҪһЩ¼¼ÇÉ£¬²»È»µÄ»°ºÜÄÑ¿ØÖÆÏßÌõµÄ´Öϸ£¬ÆäʵֻÐèÒªÉèÖü¸¸öÑùʽ¾ÍÄܸ㶨£¬Ò»ÏÂÊÇÔ´Â룬´ó¼Ò¿ÉÒÔÔËÐÐһϿ´¿´Ð§¹û<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml ......

ÀûÓÃflex builder À´¿ª·¢php

ÒòΪflex builder ¹¤¾ßÊÇ»ùÓÚeclipse ÉϵÄ,ËùÒÔһЩ¿ª·¢plug in ÔÚflex builder  Ò²ÊÇ¿ÉÒÔÓõÄ.
php:
   Help-->Software Updates-->Find and Install-->Search for new feature to install-->new Reomote site
      URL: http://update.phpeclipse.net/update/st ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ