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

FlexÓë·þÎñÆ÷½»»¥Ö®Ò»£¨URLRequest +URLLoaderÓ¦Óã©

   ÓÉÓÚFlexÖ»ÊÇÒ»ÖÖ¿Í»§¶Ë¼¼ÊõÆä±¾Éí²¢²»ÄÜÖ±½ÓͬÊý¾Ý¿â½»»¥£¬ÔÚʵ¼ÊµÄÓ¦Óÿª·¢¹ý³ÌÖÐFlexÌṩÁËÈçURLRequest¡¢HTTPService¡¢RemoteObject¡¢WebServiceµÈÀàÒÔʵÏÖͬ·þÎñÆ÷µÄͨѶºÍÊý¾Ý½»»¥£¬ÏÂÃæ×öһЩ½éÉܺÍʵÀý½âÎö:
   1¡¢Ê¹ÓÃURLRequestÏò·þÎñÆ÷·¢ËÍÇëÇó£¬Ê¹ÓÃURLLoader½ÓÊÕ·þÎñÆ÷·µ»ØµÄÊý¾Ý:
    URLRequestÀà¿É²¶»ñµ¥¸ö HTTP ÇëÇóÖеÄËùÓÐÐÅÏ¢£¬¿ÉÒÔ½« URLRequest ¶ÔÏ󴫵ݸø Loader¡¢URLStream ºÍ URLLoader ÀàÒÔ¼°ÆäËû¼ÓÔØ²Ù×÷µÄ load() ·½·¨ÒÔÆô¶¯ URL ÏÂÔØ;ĬÈÏÇé¿öÏ£¬´«µÝ¸ø url ²ÎÊýµÄ URL ±ØÐëÓëÖ´Ðе÷ÓÃµÄ SWF ÎļþÔÚÍêÈ«ÏàͬµÄÓò£¬°üÀ¨×ÓÓò¡£Èç¹ûÒª´ÓÆäËüÓòÖмÓÔØÊý¾Ý£¬ÇëÔÚ³ÐÔØÊý¾ÝµÄ·þÎñÆ÷ÉÏ·ÅÖÃÒ»¸ö¿çÓò²ßÂÔÎļþ¡£ÓйØURLRequestÏêϸ¿É²Î¿´http://help.adobe.com/zh_CN/AIR/1.1/jslr/flash/net/URLRequest.html
   URLVariablesÀàÖ÷ÒªÓÃÀ´ÔÚÓ¦ÓóÌÐòºÍ·þÎñÆ÷Ö®¼ä´«Êä²ÎÊý±äÁ¿;Ïêϸ²é¿´:http://livedocs.adobe.com/flex/3_cn/langref/flash/net/URLVariables.html
   URLLoader ÀàÒÔÎı¾¡¢XML¡¢¶þ½øÖÆÊý¾Ý»ò URL ±àÂë±äÁ¿µÄÐÎʽ´Ó URL ·µ»ØÇëÇóµÄÊý¾ÝÏêϸÇë²Î¿´:http://livedocs.adobe.com/flex/3_cn/langref/flash/net/URLLoader.html
    Íê³ÉÒÔÏÂʾÀýÒªÒýÓõ½µÄFlex°ü:
import mx.rpc.events.FaultEvent;
import mx.collections.XMLListCollection;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.net.URLVariables;
import flash.net.URLRequestMethod;
import flash.events.Event;
import mx.utils.URLUtil;
import mx.collections.ArrayCollection;
import mx.rpc.events.ResultEvent;
import com.adobe.serialization.json.JSON;

   2¡¢Ó¦ÓÃʾÀýÒ»£ºÍ¨¹ýURLRequestºÍURLVariablesÏò·þÎñÆ÷·¢ËͲÎÊýÇëÇó²¢·µ»Ø·þÎñÆ÷Îı¾Êý¾Ý£¨ÒÔÏ·þÎñÆ÷¶Ë¶¼²ÉÓÃasp.net±àд£©
   ·þÎñÆ÷¶Ë´úÂë:
protected void Page_Load(object sender, EventArgs e)
{
//»ñÈ¡URLResuestÇëÇ󻨵IJÎÊý ·µ»ØÊý¾ÝÓã»·Ö¸ôÒÔ·½±ãFlex¶ÔÊý¾Ý½øÐÐÐòÁл¯
string rs = String.Format("name={0};age={1};address={2}",Request.QueryString["name"],


Ïà¹ØÎĵµ£º

FlexÓëJavascript»¥ÏàͨÐÅ

FlexÓëJavascript»¥ÏàͨÐÅ¡£
ÔÚFlexÖÐÓÐÕâôһ¸öÀࣺExternalInterface.ÔÚÕâ¸öÀàÖÐËü¸øÎÒÃÇ£ºcallºÍaddCallback
FlexÖÐAsµ÷ÓÃJsµÄ·½·¨ÊÇ£º
     1¡¢µ¼Èë°ü £¨import flash.external.ExternalInterface;£©
     2¡¢Ê¹ÓÃExternalInterface.call("Jsº¯ÊýÃû³Æ",²ÎÊý)½øÐе÷Óã¬Æä· ......

ÔÚFlexÖеĸü¸Ä¹ö¶¯ÌõµÄÍâ¹Û

HScrollBar {
downArrowUpSkin:
Embed(source=”/assets/downArrow.png”);
downArrowOverSkin:
Embed(source=”/assets/downArrow.png”);
downArrowDownSkin:
Embed(source=”/assets/downArrow.png”);
upArrowUpSkin:
Embed(source=”/assets/upArrow.png”);
upArro ......

Flex no.2

--------------ex2_01_solution  ѡȡʱ¼ä-----------------------
 ...
   private function dateChangeHandler():void
   {
    // The Alert.show() message displays a static string plus the selected date in the startDate control
   ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ