Flex»òFlashµÄ¿çÓò·ÃÎʵĽâ¾ö·½°¸
¹ØÓÚFlex»òFlashµÄ¿çÓò·ÃÎʵĽâ¾ö·½°¸£¬ÊÂÇéµÄÆðÒòÊÇ£¬ÓÉÎÒ¹«¿ªµÄÒ»¸öwebservice£¨²»Çå³þÕâ¸öwebservice¸ÉʲôµÄÇë¿´ÕâÀ¿ªÊ¼µÄ£¬kenshinµÄÅóÓÑsensunÔÚÕâ¸ö¹«¿ªµÄwebserviceµÄ»ù´¡ÉÏÖÆ×÷ÁËÒ»¸öweather²éѯµÄ£¬ÔÚ±¾»ú²âÊÔok£¬Ò»Äõ½ÍøÉÏ£¬¾Í»á³öÏÖerror£¨ÊÇ¿çÓò·ÃÎʵĴíÎ󣩣¬ºóÀ´£¬kenshinÖÕÓÚÕÒµ½ÁËÕâ¸öÎÊÌâµÄ½â¾ö·½°¸£¬ÈçÏ£º
дһ¸öÃû×ÖΪ crossdomain.xml µÄXMLÎļþ£¬Õâ¸ö·½·¨ÊÇÔÊÐíÈκÎFlash¶¼¿ÉÒÔµ÷Ó㬷ŵ½±»µ÷ÓÃÎļþµÄÍøÕ¾¸ùĿ¼Ï£º
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy
SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" />
</cross-domain-policy>
Ö»ÈÃÄãÔÊÐíµÄÍøÕ¾À´µ÷ÓÃÄãµÄÊý¾Ý~.
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy
SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy> ²ÖqWCÒ¸ 闬
<allow-access-from domain="www.yoursite.com" />
<allow-access-from domain="yoursite.com" />
<allow-access-from domain="*.k-zone.cn" />
</cross-domain-policy>
Èç¹ûʹÓÃXMLSocketÒª°Ñ¶Ë¿ÚºÅ¼ÓÉÏ
<cross-domain-policy>
<allow-access-from domain="*.foo.com" to-ports="507,516" />
<allow-access-from domain="*.bar.com" to-ports="516-523" />
<allow-access-from domain="www.foo.com" to-ports="507,516-523" />
<allow-access-from domain="202.117.80.2" to-ports="*" />
</cross-domain-policy>
Èç¹û°²È«²ßÂÔÎļþ·ÅÔÚ¸ùĿ¼£¬ÎļþÃû×Ö±ØÐëΪcrossdomain.xml£¬Èç¹û²»·ÅÔÚ¸ùĿ¼£¬ÒªÓÃSystem.security.loadPolicyFile(http://webservice.k-zone.cn/crossdomain.xml )ÕâÑùµÄ·½·¨¼ÓÔØ°²È«²ßÂÔÎļþ¡£
Ïà¹ØÎĵµ£º
C#ÓëFlash½»»¥ £¨×ª×ÔСÀÚÔÚÏߣ©
C#ÓëFlash½»»¥
Ç°¶ÎÈÕ×Ó¹«Ë¾ÒªÇó×öÒ»¸öC#ÓëFlash½»»¥µÄ¶«Î÷£¬ÓÃÀ´C#Óë¶ÌÐÅèͨѶ½«Êý¾Ý´«µ½FlashÉÏÏÔʾÓë²Ù×÷µÄÓ¦Óá£
µÚÒ»²½C#Ìí¼Ó×é¼þ
´ò¿ªVS2005-¹¤¾ß-Ñ¡Ôñ¹¤¾ßÏäÏî-COM×é¼þ-Ñ¡ÔñShockwave Flash Object-È·¶¨
Ìí¼ÓºÃ×é¼þÍù³¡¾°ÉÏÍÏ·Å£¬Èç¹ûÌáʾע²áÐèÇó×¢²á
c# ×¢²á¿Ø¼þ-ÔÚÔËÐÐÊä ......
Ò»¡¢Application³£ÓõÄʼþ
initialize=============>³õʼ»¯
createcomplate==========>ÔªËؼÓÔØÍê
initialize·¢ÉúÔÚcreatecomplate֮ǰ¡£
¶þ¡¢Êý¾ÝÇëÇó˵Ã÷
HTTPService==========>httpÊý¾ÝÇëÇó¡£
SOAP(Simple Object Access Protocal)=======> webService
AMF(Adobe Action Message Format)========&g ......
ÉÏÃæÊÇÒ»¸öflex×öµÄÑ¡Ôñ£¬Ö÷ҪѧϰÊý¾Ý Model¸úDateGridµÄÓ÷¨ ¹þ£¬Ô´ÂëÈçÏ£º
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" fontSize="12">
<mx:Model id="books">
<datas>
<book>
  ......
×î½üÓöµ½¸öÎÊÌ⣬¿ª·¢webÏîÄ¿µÄʱºò£¬¿ÉÄÜflexÖ»ÓÃÀ´ÊµÏÖÏîÄ¿µÄ²¿·ÖÄ£¿é¡£µ±flexÐèÒªÔÚ¿Í»§¶ËдÈë/¶ÁȡһЩ״̬ÐÅÏ¢µÄʱºò£¬ÎÒÃÇ»áÏëµ½ÓÃcookie¡£flexÊDz»Ö§³ÖcookieµÄ£¬Ö»ÓÐSharedObjectÕâ¸ö±¾µØ¶ÔÏó¡£ËùÒÔ½â¾öµÄ°ì·¨¾ÍÓÐÁ½¸ö£º
flexͨ¹ýµ÷ÓÃjsÀ´ÊµÏÖ¶ÔcookieµÄ²Ù×÷£»
jsͨ¹ýflexʵÏÖ¶ÔSharedObjectµÄ²Ù×÷£»
ÕâÁ½ÖÖ·½·¨ ......
adodeµÄflash²¥·ÅÆ÷¿ÉνӰÏìÉîÔ¶£¬¸øÎÞÊýÓû§´øÀ´Á˺ÜѤÀöµÄÊÓ¾õЧ¹û¡£
¿ÉÒÔºÁ²»¿äÕŵØ˵£¬flash²¥·ÅÆ÷½â¾öÁËÍøÒ³µÄ¸´ÔÓ½»»¥ÎÊÌ⣬´Ó¶øΪ»¥ÁªÍøÌṩÁËÁ¼ºÃµÄÌåÑéЧ¹û£¬Ä¿Ç°
flash½¨Õ¾¡¢flashÈ«Õ¾¡¢flash Ó¦ÓÃÔÚÍøÒ³ÉÏÔ½À´Ô½¶à¡£»¥ÁªÍøÉÏflashµÄСӦÓÃÓëflashÕ¾¿Éν¶àÈçţë¡£
ÔÚÊÖ»úƽ̨ÉÏ·¢Õ¹ÈçºÎÄØ£¿ÊÖ»úÉÏÄ¿Ç ......