flex ʼþ»úÖÆ
FlexµÄʼþÆäʵºÜÈÝÒ×Ã÷°×£¬ÏóJAVAÓïÑÔÒ»Ñù£¬¸øij¸ö¿Ø¼þ×¢²áÒ»¸ölistener£¬È»ºóʼþ·¢ÉúµÄʱºò´¥·¢ÏàÓ¦µÄº¯Êý£¬ÕâµãÎÒÏàÐÅ´ó¶àÊýÈ˶¼Äܹ»Ã÷°×¡£½ñÌìÎÒÏëҪ˵µÄ²»ÊÇÕâ¸ö£¬¶øÊǸü¼Óϸ½ÚµÄһЩ¶«Î÷¡£
1.ʼþµÄ´«²¥¹ý³Ì¡£
FlexʼþÓÐÏÂÃæÈý¸ö½×¶Î£¬µ±Ê¼þ·¢ÉúʱÒÀ´ÎΪ£º
1.capturing£¨²¶×½£©
2.targeting£¨Ä¿±ê£©
3.bubbling£¨ÆðÅÝ»òÕß»ØËÝ£©
ÔÚÕâЩ½×¶Î£¬³ÌÐòÖдӸù½Úµãµ½´¥·¢Ê¼þµÄ½Úµã£¨ÕâÀïµÄ½Úµã¾ÍÊÇÖ¸¿ÉÒÔ°ÑÕû¸öMXMLÎļþ¿´×÷ÊÇÒ»¸öXML£¬ÄÇô½Úµã¾ÍÊǸ÷¸ö±êÇ©£©¶¼Óлú»áÀ´ÏìӦʼþ¡£¼Ù ÉèÓû§µã»÷ÁËHBoxÈÝÆ÷ÖеÄÒ»¸öButton£¬ÔÚcapturing½×¶ÎFlex»á¼ì²éApplicationºÍHBoxÊÇ·ñ¶Ô´Ëʼþ¶¨ÒåÁË listener£¬È»ºóÔÚtargeting½×¶ÎFlex´¥·¢ButtonµÄlistener£¬ÔÚbubbling½×¶ÎFlexÓÖ»á¼ì²é ApplicationºÍHBox£¬²»¹ýÕâ´ÎµÄ˳ÐòºÍcapturing״̬ʱÏà·´¡£Ò²¾ÍÊÇ˵£¬Ê¼þ·¢ÉúµÄʱºò´Ó¸ù½Úµãµ½Ä¿±ê½ÚµãµÄ¸¸½ÚµãÓÐÁ½´Î»ú»á¿ÉÒÔ ÏìӦʼþ¡£
Õû¸öʼþµÄÕâÈý¸ö½×¶ÎÒ²¾ÍÐγÉÁËÒ»¸öʼþÁ÷¡£ËùÒÔÄã¿ÉÒÔÔÚ¹¤×÷Á÷ÖеÄÈÎÒâ½ÚµãÉÏ×¢²álistener¶ø²»Óõ£ÐIJ»»á±»´¥·¢¡£»¹ÓÐÒ»µãÐèҪ˵Ã÷µÄÊÇ£¬Ö»ÓÐ¿É ÊӵĶÔÏ󣨱ÈÈçһЩÈÝÆ÷ºÍ¿Ø¼þ£©²ÅÓеÚÒ»¸öºÍµÚÈý¸ö½×¶Î£¬¶øÏñSocketÕâÖÖûÓнçÃæµÄ¶ÔÏóÖ»ÄÜÔÚtargetingʱ±»´¥·¢£¬ËüÎÞ·¨²ÎÓëµÚÒ»¸öºÍµÚÈý ¸ö½×¶Î¡£
ËäȻÿ¸ö¶ÔÏó¶¼ÓÐÁ½´ÎÏìӦʼþµÄ»ú»á£¬µ«ÊÇÔÚĬÈÏÇé¿öÏ£¬capturing״̬ʱûÓжÔÏó»áÏìӦʼþ£¬³ý·ÇÄãÌرðÉùÃ÷ÒªÔÚcapturing½×¶ÎÏìÓ¦¡£Äã¿ÉÒÔ°ÑaddEventListener() ÖеÄuse_capture²ÎÊýÉèÖÃΪtrue£¬ÕâÑù¾Í¿ÉÒÔÔÚcapturing½×¶ÎÏìÓ¦ÁË¡£µ«ÊÇÇë×¢Ò⣬һµ©ÔÚcapturingÖÐÏìÓ¦¹ýÖ®ºóÔÚbubbling½×¶Î¾Í²»»áÔÙÏìÓ¦ÁË¡£Èç¹ûÄãÏëÒªÈÃlistenerÔÚcapturingºÍbubbling½×¶Î¶¼ÏìÓ¦µÄ»°£¬Ö»ÄÜÁ½´Îµ÷ÓÃaddEventListener() £¬Ò»´Î°Ñuse_capture²ÎÊýÉèÖÃΪtrue£¬µÚ¶þ´Î°ÑËüÉèÖÃΪfalse¡£
ÁíÍ⣬ÄãÖ»ÄÜΪ¿ÉÒÔ´¥·¢Ò»¸öʼþµÄ¶ÔÏó×¢²á´ËʼþµÄlistener¡£±ÈÈ磬Äã¾Í²»ÄÜΪһ¸öForm¶¨ÒåÒ»¸öClickʼþ£¬¼´Ê¹Ëü°üº¬Ò»¸öButton¿Ø¼þ£¬ÒòΪFormÎÞ·¨´¥·¢Clickʼþ¡£
Äã¿ÉÒÔʹÓÃÏÂÃæÁ½¸öº¯ÊýÀ´ÖÐֹʼþµÄ´«²¥£º
stopPropagation()
stopImmediatePropagation()
Á½ÕßΨһµÄÇø±ð¾ÍÊÇstopPropagation()ÊÇÔÚµ±Ç°¶ÔÏóµÄËùÓÐlistenerÖ´ÐÐÍê±ÏÖ®ºóÔÙÖÐֹʼþµÄ´«²¥£¬¶øÁíÍâÒ»¸öÊÇÁ¢¿ÌÖÕÖ¹¡£
2.FlexʼþÖеÄtargetºÍcurrentTarget
ÿ¸öEvent¶ÔÏó¶¼ÓÐtargetºÍcurrentTargetÊôÐÔ£¬ËûÃÇ¿ÉÒÔ°ïÖúÄã¸ú×Ùʼþ´«²¥¹ý³Ì¡£targetÖ¸µÄÊÇ´¥·¢Ê¼þµÄ¶ÔÏ󣬶ø currentTargetÔò
Ïà¹ØÎĵµ£º
themeColor Ö÷ÌâÑÕÉ«£ºÈç¹û¶ÔÉ«²ÊÑùʽÅäÖò»Ïë¹ý¶àµÄÈ¥ÉèÖõĻ°£¬themeColorÊÇÒ»¸öÑ¡Ôñ¡£Ëü¿É
ÒÔÈÃÄãÑ¡ÔñÒ»ÖÖ»ù±¾É«²Ê£¬È»ºó×é¼þµÄ±ß¿ò£¬Íâ¹ÛµÈÉ«²Ê½«»áÒÔ´ËÉ«²ÊΪ»ù´¡¹¹³ÉÒ»×éȱʡµÄÑùʽ£¬×é¼þ¾ù¿ÉʹÓôËÑùʽÊôÐÔ¡£
Application×é¼þÑùʽÊôÐÔ
backgroundImage &n ......
Flex
ÊÇÒ»¸ö¿ªÔ´µÄÓ¦Óÿª·¢¿ò¼Ü£¬ÓÃÀ´¹¹½¨ÔËÐÐÔÚweb£¨Ê¹Óà Flash Player£©»òÕß×ÀÃæÉÏ£¨Ê¹ÓÃAdobe
AIR£©µÄ¸»InternetÓ¦Óá£AdobeµÄFlex¿ª·¢ÕßÖÐÐÄÓÐһƪÎÄÕÂÌÖÂÛÁ˹ØÓÚFlexÐÔÄܵÄ×î¼Ñʵ¼ù£¬°üÀ¨ÁËÈÝÆ÷µÄʹÓÃϸ½Ú£ºFlex×î´óµÄ
ÐÔÄÜ·çÏÕÀ´×ÔÓÚ¶ÔÈÝÆ÷µÄÀÄÓá£ÔÚAdobe FlexÖÐÓдóÁ¿¿ÉÑ¡µÄÌØÐÔ£¬ÄãÓ¦¸Ã¿¼ÂÇÔÚÄãµÄÓ¦ÓÃÖÐʹÓÃËüà ......
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, us ......
Ç°ÑÔ
C/C++µÄ¿ª·¢£¬ÄÚ´æµÄ¹ÜÀíÊÇÊ®·ÖÖØÒªµÄ¿ÎÌ⣬·ÖÅäÄÚ´æʹÓúóÒª¼°Ê±ÊÍ·Å£¬·ñÔòÄÚ´æй©µ¼ÖÂÄÚ´æºÄ¾¡¡£½øÈëÍйܻ·¾³ºó£¬ÄÚ´æÄܹ»×Ô¶¯¹ÜÀíºÍ»ØÊÕ£¬ÒѾ²»Óÿª·¢ÕßÌ«²ÙÐÄÄÚ´æ¹ÜÀí·½ÃæµÄÎÊÌâÁË£¬ÔÚÍйܻ·¾³£¬¿ª·¢ÕßÈÔÈ»¿ÉÒÔ×öһЩ¹¤×÷£¬ÌṩÄÚ´æ»ØÊÕµÄЧÂÊ£¬ÀýÈ磬°ÑÀàÄÚ²¿µÄÒýÓöÔÏóÉèÖÃΪnullÊÇ×î»ù±¾µÄ¡£½è¼øÔÚ.net»·¾³ ......