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µ ......
ת£ºhttp://hi.baidu.com/qinpanke/blog/item/39745a834df933a50cf4d2fc.html
********************************************************************************************************
Ò»Çж¼ÔÚ´úÂëÖУ¬ÎÞÐè¶àÑÔ¡£ÐèҪעÒâµÄÊÇ£º
'_self'´ú±íÔÚ±¾´°¿ÚÖдò¿ª
'_blank'´ú±íÔÚºǫ́д°¿ÚÖдò¿ª
******************* ......
1.д session
mxml Îļþ ¼Ó
<mx:RemoteObject source="servlet" id="sessionObject" />
as ÎļþÓÃÏÂÃæÓï¾äµ÷ÓÃ
sessionObject.session("set", "foo", 30200);
2.¶Á session
mxml Îļþ ¼Ó
<mx:RemoteObject source="servlet" id="sessionObject1" res ......
1.µ¯³öд°¿Ú
Flexͨ¹ýPopUpManagerÀàÀ´ÊµÏÖµ¯³öд°¿Ú£º
ÏÈÉèÖúÃÒªµ¯³ö´°¿ÚµÄÒ³Ãæ£¬È»ºóÔÚÖ÷´°¿ÚÖÐÏÈnew³öµ¯³ö´°¿ÚµÄ¶ÔÏó£¬È»ºó¿ÉÒÔ¶Ôµ¯³ö´°¿ÚµÄÊôÐÔ½øÐÐ
¸³Öµ£¬
var genggai : GengGaiWindow = new GengGaiWindow();
genggai.logId = adg.selectedI ......
1.ÔÚ<Object>ºÍ<embed>ÖÐÉèÖÃflashVars²ÎÊý
£¬ÀýÈ磺
<object
id=’mySwf’ classid=’clsid:D27CDB6E-AE6D-11cf-96B8-444553540000′
codebase=’http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab’
height=’100%’ width=’10 ......