flexÖеÄaddEventListener·½·¨
flex¿Ø¼þ¶ÔÏó¡¢RemoteObjectµÈ¶¼ÓÐÒ»¸ö¹²Í¬µÄ·½·¨addEventListener¡£
addEventListener·½·¨ÈçÏ£º
public function addEventListener(type:String, listener:Function,
useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
{
eventDispatcher.addEventListener(type, listener, useCapture, priority, useWeakReference);
}
@param type:String ´¥·¢Ê¼þµÄÀàÐÍ£¬flexÔ¤¶¨ÒåµÄʼþÀàÐͺʹ¦Àí·½Ê½¡£
@param listener:Function ʼþ´¥·¢Ê±µÄ»Øµ÷º¯Êý¡£
@param useCapture:Boolean ʼþ´¦ÀíµÄ˳Ðò
@param priority:int ʼþÓÅÏÈȨ£¬ÎÒµÄÀí½âÊÇÈç¹ûÌí¼ÓÁ˶à¸ölistenerÔò°´ÕÕpriorityµÄ˳ÐòÖ´ÐÐ:(û¶à´óÓÃ
@param useWeakReference:Boolean ÊÇ·ñÉèΪÈõÒýÓÃ
Öص㽲½øºóÃæÈý¸ö²ÎÊý¡£
useCapture ²ÎÊýÖ»ÓÐÓÃʵÀý²ÅÄܱí´ïÇå³þ¡£
useCaptureÀý£º
<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute” applicationComplete=”init()”>
<mx:HBox id=”hbox” >
<mx:Button id=”button” label=”click”/>
</mx:HBox>
<mx:Script>
import mx.controls.*;
public function init():void
{
// ×¢Ò⣺ÕâÀïµÄuseCapture:BooleanÖµÓ¦¼Óµ½Ò»¸ö°üº¬ÄÚ²¿ÔªËصĿؼþÉÏ£¬ÕâÑù²ÅÄÜÈÃflexÔËÐÐʱʶ±ðʼþ˳ÐòµÄ·¶Î§£¡£¡£¡
// ÓÉÓÚ flexµÄAlert¿Ø¼þÊÇÖصþ·½Ê½ÏÔʾ£¬ËùÒÔ×îÍâÒ»²ã²ÅÊÇ×îºóµ¯³öµÄÒ»²ã
hbox.addEventListener(MouseEvent.CLICK,hboxClick,true);
button.addEventListener(MouseEvent.CLICK,buttonClick);
}
public function hboxClick(e:MouseEvent):void
{
Alert.show(”ÍâHBoxʼþ¡£”);
}
public function buttonClick(e:MouseEvent):void
{
Alert.show(”ÄÚButtonʼþ¡£”);
}
</mx:Script>
</mx:Application>
ÔÎĵØÖ·£ºhttp://blog.sina.com.cn/s/blog_5c4558600100d39q.html
Ïà¹ØÎĵµ£º
<mx:HSlider id="priceSlider" creationComplete="{HsilderChangeThumb(event)}"/>
<mx:Script>
<![CDATA[
private function HsilderChangeThumb(e:Event):void
{
var slider:HSlider = e.target as HSlider;
&nbs ......
±¾ÎÄͨ¹ýΪһ¸öÐé¹¹µÄ¹«Ë¾Éè¼ÆµÄ¾ÖÓòÍøÓ¦ÓÃʵÀý——Spark Intranet Sample App£¨Èçͼ1£©£¬½éÉÜÁËFlex 4 beataºÍFlash Builder 4 betaÖÐеÄһЩÌØÐÔ¡£
±¾ÎÄÄÚÈÝÊʺÏÓÚÓÐFlex 2»òFlex 3֪ʶ£¬×îºÃ»¹¶ÔFlex 4 beta¿ò¼ÜÓÐһЩ»ù±¾½Ó´¥µÄ¿ª·¢Õß¡£Í¨¹ý¾ßÌåÓ¦ÓÃÀí½âFlex 4ÓëÆä¸üÔç°æ±¾Ö®¼ä²îÒ죬ÊÇÒ»¸öºÃ°ì·¨¡£±¾ÎÄÖ÷Ò ......
ÔÚFlexÀïÃæ²»ÏñÔÚFlashÀïÃæËæÒâÖÆ×÷¶¯»ÁË£¬Flex¸üÇ÷ÏòÓÚÓ¦ÓóÌÐò£¬¶ø²»ÊǶ¯»ÖÆ×÷ÁË£¬ËùÒÔûÓÐÁËʱ¼äÖáµÄ¸ÅÄî¡£ÔÚFlexÖÐʹÓö¯»Ð§¹û£¬¿ÉÒÔÓÃFlex×Ô´øµÄEffect£¬»òÕß×ÔÒѶ¨ÖÆEffect£¬ÒòΪºÜ¶àÈ˶¼Ïë½èFlashÀïÃæµÄÒ»Ñù²Ù×÷Flex£¬±ÈÈçÔÚFlashÀïÃæ×öÒ»¸ö¶¯Ì¬°´Å¥ºÜÈÝÒ×£¬µ±Êó±êÒƶ¯µ½ÉÏÃæʱ£¬»áÓкܶ෢¹âµÄµãÅܳöÀ´£¨Ó«»ð³æÐ ......
µÇ½ҳÃæ
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()">
<mx:Script>
<![CDATA[
import flash.net.navigateToURL;
private function setCookie():void{
&nb ......
DataGrid×é¼þÑùʽÊôÐÔ
backgroundColor ±³¾°É«
backgroundAlpha &nb ......