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

Flexʼþ»úÖÆ»ù´¡(Ò»)

ºÜ¶à¿ª·¢ÈËÔ±¶¼ÖªµÀÈçºÎʹÓÃʼþ»úÖÆ£¬µ«È´²»Àí½âʼþ»úÖƵĻù±¾¹¤×÷Ô­Àí¡£ÔÚÕâÀïÎÒÃÇ̽ÌÖÒ»ÏÂActionScript 3µÄʼþ»úÖÆ(ÎÞÂÛÊÇÐÂÊÖ»¹ÊÇÀÏÊÖ£¬ÎÒÏàÐÅ¿´µ½×îºó¿Ï¶¨¶ÔÄãÓÐËù°ïÖú )¡£
1. Ê×ÏÈÀ´¿´Ò»ÏÂʼþ»úÖÆÖеļ¸¸ö»ù±¾¸ÅÄ
event objects(ÕâÀïÎÒÃǹÃÇÒ½ÐËüʼþ¶ÔÏó)£ºËùÓеÄʼþ¶ÔÏó¶¼ÊÇflash.events.Event»òÕßÆä×ÓÀà¡£±ÈÈç˵Êó±êʼþMouseEvent£¬¼ÆʱÆ÷ʼþTimerEvent¡£Ã¿¸öʼþ¶ÔÏóÖж¼°üÀ¨Ê¼þÀàÐÍ(type)ºÍʼþÔ´(target)£¬±ãÓÚevent listenerÖªµÀ¸ÃʼþµÄÀàÐÍÒÔ¼°ÊÇË­Å׳öÕâÑùµÄʼþ¡£
event dispatchers(¹ÃÇÒ½ÐËüʼþÔ´):ÊÇʼþ·¢ÆðµÄÖ÷Ìå¡£ËùÓеÄdispatcher¶¼ÊÇEventDispatcher»òÆä×ÓÀࡣʼþ´¥·¢Ô´±ØÐëÌṩAPIÈÃlistener½øÐжԸÃʼþµÄ×¢²á(register)¡£
event listeners(¹ÃÇÒ½ÐËüʼþ¼àÌýÆ÷):ÔÚAS 3.0ÖÐËüÍùÍù±íÏÖΪһ¸öº¯Êý¡£ÎÒÃDZØÐëΪÿ¸öÌØÊâµÄʼþºÍʼþÔ´×¢²áÒ»¸ö¼àÌýÆ÷£¬µ±Ê¼þ·¢ÉúµÄʱºò£¬Ê¼þÔ´(dispatcher)»á֪ͨ¸Ã¼àÌýÆ÷È¥´¦ÀíÖƶ¨µÄʼþ¡£
2. ÈçºÎ×¢²á¼àÌýÆ÷(registering Listener)
ÔÚAS 3.0ÖпÉÒÔͨ¹ýÏÂÃæµÄÓï·¨¸ñʽ½øÐÐ×¢²á¡£
dispatcher.addEventListener(eventName, listener);
µ±È»ÔÚFlexÖл¹ÓÐÁíÍâÒ»ÖÖ¸ñʽ£¬ÔÚmxmlÎļþÖжÔÒ»¸ö¿Ø¼þµÄʼþÖ±½ÓÖƶ¨Ò»¸ö´¦Àíº¯Êý£¬Èç
<mx:Button label="TestClick" click="clickHandler()"/>
3. ÈçºÎɾ³ý¼àÌýÆ÷(removing Listener)
ÔÚAS 3.0ÖÐÒÔÏÂÃæµÄ¸ñʽ½øÐÐɾ³ý
circle.removeEventListener(MouseEvent.CLICK, onClick);
Ó¦¸ÃºÜÈÝÒ×Àí½â¡£
µ«ÕâÀïÈ·ÓÐÒ»µãºÜÖØÒª£º¾¡Á¿É¾³ýÄãÒѾ­²»ÔÙʹÓõÄʼþ¼àÌýÆ÷£¬Õâ¸öÉæ¼°µ½Flex ÄÚ´æй©µÄÎÊÌ⣬ÒÔºó»áÓÐÏêϸ½éÉÜ¡£
ת×Ô£ºhttp://wmcai.blog.163.com/blog/static/48024200782442026437/


Ïà¹ØÎĵµ£º

flexͼ±í×ø±êÖáÑùʽÉèÖÃ

<?xml version="1.0"?>
<!-- Simple example to demonstrate the ColumnChart and BarChart controls. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="initApp()"
backgroundColor="#FFFFFF" width="350" height="125"
layout="absolute">
<!- ......

flex×ÊÔ´

Ò» ÍøÕ¾
1 ÔÚÏßͼƬ´¦Àí¹¤¾ßÍøÕ¾http://www.flauntr.com/
¡£
2 ¹Ù·½ÍøÕ¾µÄÀý×Ó http://examples.adobe.com/flex3/componentexplorer/explorer.html
3 ¹Ù·½AS3ѧϰ×ÊÁÏÍøÕ¾  http://www.adobe.com/devnet/actionscript/
4 Õâ¶ùÍƼöÒ»¸öÍøÖ·£¬²»½ö¿ÉÒÔ¶ÔÆäËüµÄÊý¾ÝÀàÐͽøÐÐѧϰ£¬»¹Óлù´¡µÄÓï·¨£¬·Ç³£²»´í£º
  ......

¡¾Êղء¿FlexÊý¾ÝͨѶ

Flex/Flash Ö§³ÖµÄÊý¾ÝͨѶ·½Ê½ÓУº
http URLLoader
SOAP(webservice)
json
xml
flash remoting / AMF3
xmlsocket
socket(¶þ½øÖÆ)(×Ô¶¨ÒåЭÒé)
¸ß²¢·¢µÄÓ¦ÓÃÖÐÓû§×´Ì¬¿ÉÒÔÓÃcookie£¬²»ÓÃsession
Èç¹ûÊǶàÈËʵʱ½»»¥ÈçÁÄÌìϵͳ£¬¶àÈËÔÚÏß»¥¶¯µÈÓ¦ÓÃÄ£¿é¡¡ÐèÒªÓÃsocket½øÐÐͨѶ(Óë·þÎñÆ÷½¨Á¢³¤Á¬½Ó)£¬·þÎñÆ÷¶Ë¿ÉÒÔ× ......

¹ØÓÚflex MDIµÄÓ¦ÓÃ

¹ÙÍøÐÅÏ¢£º(API:http://flexlib.googlecode.com/svn/trunk/docs/index.html)
HowToContribute  
How you can contribute code to FlexLib
IntroductionLicenseBefore you submit codeFlexBuilderProject page to learn how to check out the project into Flex Builder. Read HowToBuild to learn how to compile ......

½«HTMLÒ³ÃæǶÈëFLEXÓ¦ÓÃÖÐ

ÏÈÓÃÏֳɵÄ×é¼þÍæһϣ¬Ò»»áÔÙÈ¥¿´¿´×é¼þÔ´ÂëÑо¿Ò»Ï¡£
http://code.google.com/p/flex-iframe/
ÏÂÔØÁËflexiframe.swc£¬ÒýÈ빤³Ì¡£
flex´úÂë
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="absolute"
   ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ