Flexʼþ»úÖÆ»ù´¡(¶þ)
4. Àí½âʼþ½×¶Î(Event Phases) ÎÒÃÇ°Ñʼþ´¥·¢Ô´·ÖΪÁ½ÀࣺһÀàÊÇÄÇЩÏÔʾÔÚ½çÃæÖеÄÔªËØÅ׳öµÄʼþ£¬Ò»ÀàÊÇÄÇЩ²»ÔÚ½çÃæÖÐÏÔʾµÄÔªËØÅ׳öµÄʼþ¡£ºÜ¼òµ¥£¬¾Ù¸öÀý×Ó£ºµÚÒ»ÀàÈçURLLoader¶ÔÏóÈ¥loadͼƬ»òÆäËû×ÊÔ´ËùÅ׳öµÄÈçcompleteʼþ£¬¾ÍÊôÓÚµÚÒ»Àà¡£½çÃæÉϵÄÒ»¸ö°´Å¥ËùÅ׳öµÄclickʼþ¾ÍÊǵڶþÀ࣬Ëü»á´¥·¢Ò»¸öʼþÁ÷£¬Òý·¢Ò»ÏµÁеÄʼþ£¬ËüÓÖ·ÖÈý¸ö½×¶Î£º²¶»ñ(capture)£¬Ö´ÐÐ(target) ºÍðÅÝ(bubble)£¬¹ÃÇÒÕâÑù±í´ïÕâÈý¸ö½×¶Î¡£ ²¶»ñ½×¶Î(capture) ÔÚÕâ¸ö½×¶Î£¬Flash Player»áÈ¥²éÕÒʼþµÄ´¥·¢Ô´£¬ËüÊÇͨ¹ý¸ùÏÔʾԪËØ(root display object)Öð²ãÏòÏÂÑ°×Ù£¬Ö±µ½ÕÒµ½Ê¼þµÄ·¢ÆðÔ´Í·£¬ÈçÄãÔÚbuttonÉÏclickºó£¬Flash PlayerÕÒµ½µÄʸÃbutton¶ÔÏó¡£ÔÚÕâ¸ö½×¶Î¼àÊÓÆ÷(listener)ĬÈÏÊDz»»áÊÕµ½ÈκÎÏûÏ¢µÄ(ĬÈÏÖ»ÔÚtargetºÍbubble½×¶ÎÊÕµ½ÏûÏ¢)¡£Èç¹ûÄãÏëÔÚ²¶»ñ½×¶ÎÈÃlistenerÊÕµ½ÏûÏ¢²¢ÓÐËù¶¯×÷£¬ÄÇôÄã¿ÉÒÔÔÚ×¢²áµÄʱºò¸Ä±äµÚÈý¸ö²ÎÊýΪtrue£¬ÈçÏÂÃæµÄ·½·¨£ºobject.addEventListener(MouseEvent.CLICK, onClick, true); ¸Ã½×¶ÎÌýÆðÀ´ºÜÄ°Éú£¬ÊÂʵÉÏËüºÜÉÙʹÓᣵ«ËüÈ´ÔÚʼþÁ÷ÖаçÑݺÜÖØÒªµÄ½ÇÉ«¡£Ëü¿ÉÒÔÔÚʼþµ½´ï×ÓÔªËØ(child elements)֮ǰ±»application²¶»ñ£¬µ±È»Ò²¾Í¿ÉÒÔ×è ֹʼþµ½´ï×ÓÔªËØ¡£ Ä¿±êÖ´Ðн׶Î(target) ÔÚÕâ¸ö½×¶ÎÊÇʼþµÄÖ´Ðн׶Σ¬Ò²¾ÍÊÇÎÒÃdz£ÓõÄÓÃÀ´´¦ÀíʼþÁ÷µÄ´úÂë¡£ ðÅݽ׶Î(bubble) ×îºóµÄÕâ¸ö½×¶ÎÆäʵ¾ÍÊǵÚÒ»¸ö½×¶ÎµÄÄæÏò¹ý³Ì¡£Ëü¾ÍÊÇÔÚʼþ´úÂëÖ´ÐÐÍê±Ïºóͨ¹ý×ÓÔªËØÖð¼¶Ïò¸¸ÔªËØ·¢³ö¸Ãʼþ£¬Ò»Ö±µ½¸ùÔªËØ¡£ÔÚÕâ¸ö½×¶ÎÄã²»ÐèÒªÌرðµÄΪ¼àÌýÆ÷Ö¸¶¨Ê²Ã´£¬ÄãÖ»ÒªÕý³£µÄ×¢²áʼþ¾Í¿ÉÒÔÁË¡£¼àÌýÆ÷»áÔڸý׶ÎÊÕµ½Í¨Öª¡£µ«Ç°ÌáÊǸÃʼþÊÇÄܹ»bubbleµÄ¡£ 5. ʼþµÄÓÅÏȼ¶(Event Prioriy) ʼþÓÅÏȼ¶ÎÒÃÇÓõĺÜÉÙ£¬µ«Àí½âËüÈ´ºÜÖØÒª£¬µ«ÄãÌí¼ÓÒ»¸öʼþµÄʱºòÄã¿ÉÒÔÉèÖüàÌýÆ÷µÄÓÅÏȼ¶£¬ÓÅÏȼ¶Ô½¸ß£¬ÄãµÄ¼àÌýÆ÷º¯Êý»áÔ½Ôç±»µ÷Óõ½¡£µ±È»Á½¸öÓÅÏȼ¶ÏàͬµÄ¼àÌýÆ÷ÊǸù¾ÝËûÃDZ»Ìí¼ÓµÄ˳ÐòÀ´¾ö¶¨ÓÅÏȼ¶µÄ¡£Õâ¸öÓÅÏȼ¶Ö¸µÄÊÇÔÚͬһ¸öʼþ½×¶Î(Èçcapture,target,or bubble).Ò»´Î£¬Ê¼þ´¦ÀíµÄÓÅÏȼ¶ÊÇÏÈ¿´½×¶ÎÔÙ¿´ÓÅÏȼ¶µÄ¡£ 6. ÈõÒýÓÃ(Weak Reference) ÈõÒýÓÃʱʼþ´¦ÀíÖзdz£ÖØÒªµÄ¸ÅÄî¡£ÒªÀí½âËüΪʲôÕâôÖØÒª£¬ÄãÊ×ÏÈÒªÀí½âFlash PlayerÊÇÈçºÎ½øÐÐÀ¬»ø»ØÊÕµÄ(garbage collection). ¹ËÃû˼Ò壬À¬»ø»ØÊÕ¾ÍÊÇ»ØÊÕÄÇЩ²»ÔÙʹÓõÄ×ÊÔ´£¬Ö÷ÒªÊÇÄÚ´æ×ÊÔ´£¬·ñÔò»áÖÂϵͳ±ÀÀ£¡£ Flash PlayerÊÇͨ¹ýÒýÓüÆÊýÆ÷(reference counting)ÒÔ¼°±ê¼ÇÓëÇå³ý
Ïà¹ØÎĵµ£º
FlexÖÐImage¼ÓÔØͼƬ³ö´íʱÏÔʾĬÈÏͼƬµÄ·½·¨Ö÷ÒªÓÐÒÔϼ¸ÖÖ£º
·½·¨Ò»£ºÀûÓà brokenImageSkin ·ç¸ñÏÔʾһ¸öĬÈϵÄͼ£¬Ö»ÐèÉèÖÃCSS¾ÍÐÐÁË£¬ÈçÏ£º
<mx:Style>
Image {
brokenImageSkin: Embed("assets/404.jpg");
}
</m ......
ÔÚ±¾ÏµÁÐÇ°Ã漸ƪÎÄÕÂÖзֱð½éÉÜÁËͨ¹ýWebService¡¢HTTPService¡¢URLLoaderÒÔ¼°FielReferenceµÈ×é¼þ
»òÀàÀ´Íê³ÉFlexÓë.NET·þÎñ¶ËµÄͨÐŵÄÏà¹Ø֪ʶµã¡£Í¨¹ýÕâЩ·½Ê½À´Íê³ÉÓë·þÎñ¶ËµÄͨÐÅÊǷdz£·½±ãºÍ¼òµ¥µÄ£¬µ«ÓÐËûµÄȱµã¾ÍÊÇͨÐÅÊý¾ÝÁ¿½ÏС£¬ÈçÒª´«
Êä´óÁ¿µÄÊý¾Ý»òÊÇʵÏÖ²»Í¬¶ÔÏóµÄÐòÁл¯´«Ê䣬ËüÃÇÔòÂú×ã²»ÁËÎÒÃǵ ......
Ê×ÏȽ¨Ò»¸önetbeansµÄjava webÏîÄ¿
È»ºó´ÓÍøÉÏ°Éblazeds.war ÏÂÔØÏÂÀ´ÓÃrar ½âѹ °Ñweb-inf Ìæ»»µôÔÚnetbeans\web ÏÂÃæµÄweb-infÖеÄÈ«²¿Îļþ
È»ºó ²¿ÊðÏÂ
ÔÚ´ò¿ªflex builder н¨Ò»¸öflex project дÉÏÃû×ÖºÍÏîĿ·¾¶
ÔÚApplication server type Ñ¡ÖÐj2ee
µã»÷ ÏÂÒ»²½
È»ºó Root folderÑ¡ÖÐnet ......
ÏÈÓÃÏֳɵÄ×é¼þÍæһϣ¬Ò»»áÔÙÈ¥¿´¿´×é¼þÔ´ÂëÑо¿Ò»Ï¡£
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"
......
Ò»°ãÀ´½²£¬ÔÚwindowsÉÏ°²×°Èí¼þ´ÓÀ´¶¼²»ÊÇʲôÄÑʶù£¬µ«FMSÈ´ÔÚ°²×°¹ý³ÌÖÐ"³äÂú"ÁËÎóµ¼£¨ºÃ°É£¬ÆäʵҲ¾ÍÊÇ¿äÕŵÄ˵·¨¶øÒÑ£©
1.ÏÂÔØFMS3.5
http://www.adobe.com/products/flashmediainteractive/?promoid=DJDTG
ÕâÉÏÃæÓÐÒ»¸öÃâ·Ñ¿ª·¢°æ(³ýÁËÁ¬½ÓÊýÓÐÏÞÖÆ£¬ÆäËü¹¦ÄÜÍêÈ«Ò»Ñù)
2.һ·Next°²×°
×¢ ......