Flex Óà POST Ìá½»Êý¾Ý
public function submit():void{
//ÒªÇëÇóµÄURL
var request:URLRequest = new URLRequest("
http://localhost:8086/test.do
") ;
var load:URLLoader = new URLLoader() ;
//URL²ÎÊý
var variables:URLVariables = new URLVariables();
//variables.+ºóÃæµÄ²ÎÊý ±íʾҪÌá½»µÄ²ÎÊý¡£
variables.content = content.text;
variables.no = 1001 ;
//Ìá½»µÄ·½Ê½
request.method=URLRequestMethod.POST;
//Ìá½»µÄÊý¾Ý
request.data=variables ;
load.dataFormat = URLLoaderDataFormat.TEXT ;
load.load(request) ;
}
ºǫ́ͨ¹ý£º
String content = request.getParameter("content") »ñÈ¡£»
String no = request.getParameter("no ") »ñÈ¡£»
Ïà¹ØÎĵµ£º
flex ºÍjavascript»¥Ïàµ÷Óá£
Ò»¡¢flex µ÷ÓÃjavascript
Ö»ÐèʹÓþ²Ì¬µÄExternalInterface.call¾Í¿ÉÒÔÁË¡£
call ·½·¨ÖÁÉÙÒªÇóÒ»¸ö²ÎÊý£¬¾ÍËùµ÷ÓöÊýµÄÃû³Æ¡£
Ò²¿ÉÒÔ´«µÝ²ÎÊý¡£
È磺
ExternalInterface.call("alert","hello");
"hello"¾ÍÊÇ×÷Ϊalertµ ......
mxml
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:cmp="com.render.*"
height="100%" width="100%" paddingTop="0" paddingBottom="0" paddingLeft="0" paddingRight="0">
<cmp:AutoSizeTree
&n ......
1.µ¯³öд°¿Ú
Flexͨ¹ýPopUpManagerÀàÀ´ÊµÏÖµ¯³öд°¿Ú£º
ÏÈÉèÖúÃÒªµ¯³ö´°¿ÚµÄÒ³Ã棬ȻºóÔÚÖ÷´°¿ÚÖÐÏÈnew³öµ¯³ö´°¿ÚµÄ¶ÔÏó£¬È»ºó¿ÉÒÔ¶Ôµ¯³ö´°¿ÚµÄÊôÐÔ½øÐÐ
¸³Öµ£¬
var genggai : GengGaiWindow = new GengGaiWindow();
genggai.logId = adg.selectedI ......
¹ØÓÚstates
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Script>
<![CDATA[
import mx.effects.easing.Bounce;
]]>
</mx:Script>
<mx:states>
<mx:State name="bookDetails" ......