flex ÖÆ×÷µÄ¼òµ¥¼ÆËãÆ÷
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal">
<mx:Panel width="382" height="277" layout="absolute">
<mx:Button x="48" y="37" label="1" width="38" height="23" id="btn1" click="btnClick('1')"/>
<mx:Button x="223" y="81" label="8" width="38" height="23" id="btn8" click="btnClick('8')"/>
<mx:Button x="168" y="81" label="7" width="38" height="23" id="btn7" click="btnClick('7')"/>
<mx:Button x="108" y="81" label="6" width="38" height="23" id="btn6" click="btnClick('6')"/>
<mx:Button x="48" y="81" label="5" width="38" height="23" id="btn5" click="btnClick('5')"/>
<mx:Button x="108" y="129" label="0" width="38" height="23" id="btn0" click="btnClick('0')"/>
<mx:Button x="48" y="129" label="9" width="38" height="23" id="btn9" click="btnClick('9')"/>
<mx:Button x="289" y="42" label="=" width="48" height="151" color="#0B0BF5" fontWeight="bold" id="btnResult" click="getResult()"/>
Ïà¹ØÎĵµ£º
<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate the DateTimeAxis class. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
import mx.collections.ArrayCollection;
......
import flash.events.Event;
import flash.net.URLLoader;
import flash.net.URLRequest;
private var loader:URLLoader = new URLLoader();
private var request:URLRequest = new URLRequest("a.txt");
private function initComplete():void
{
  ......
¼òµ¥½éÉÜÐÅFlexÓëWeb·þÎñµÄ½»»¥
Ö÷ÒªÄÚÈÝ:
1.ActionScriptÓë·þÎñ¶ËµÄ»ù±¾½»»¥·½Ê½(REST).
2.ActionScriptÌØÓеÄÊý¾Ý´«Êä¸ñʽ(AMF)Óë·þÎñÆ÷½»»¥.
3.FlexÓëWebService.
ҪʵÏÖActionScriptÓë· ......
1¡¢×Ô¶¨Òå×é¼þ
2¡¢×Ô¶¨Òåʼþ
3¡¢½áºÏʹÓÃ
Ò»¡¢×Ô¶¨Òå×é¼þ£¨Ê¹ÓõÄÊÇFlex×é¼þ£¬ActionScript×é¼þÏà¶ÔÂé·³µã£¬¿ÉÊÓ»¯²îµã£©
¸Ã×é¼þÓÉÒ»¸öTextAreaºÍÁ½¸öButton×é³É£¬Èçͼ£º
´úÂ룺
MyComponent.mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width=" ......
FlexʹÓÃLoaderºÍURLRequest¼ÓÔØ±¾µØÍ¼Æ¬Ê¾Àý£º
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Script>
<![CDATA[
import mx.core.UIComponent;
import mx.controls.Alert;
import flash.display.*;
i ......