flash与asp: 先把两个代码贴一下: flash:
var loader:URLLoader = new URLLoader();
var url:URLRequest = new URLRequest("test.asp");
url.method = URLRequestMethod.POST;
var values:URLVariables = new URLVariables();
values.message="hello im flash!"; url.data = values;
loader.dataFormat = URLLoaderDataFormat.VARIABLES; loader.addEventListener(Event.COMPLETE,loaded); function loaded(e:Event) { out1.text=loader.data; //outPut: phpMessage=im php message!&flashMessage=hello im flash! out2.text=loader.data.phpMessage; // im php message! out3.text=loader.data.flashMessage; // hello im flash! out4.text=loader.data.dbMessage; } loader.load(url);
asp:
<%@LANGUAGE="JAVASCRIPT"%> <% //接收flash传进来的数据 var flashData;
flashData = Request("message"); //发给flash的数据 var aspMessage; aspMessage = ’im asp message!’;
//数据库的相关操作 //====================================== var conn; var rs; var sql; var strPath; strPath="test.mdb"; try{ conn = Server.CreateObject("ADODB.Connection"); conn.connectionString = "Provider=Mi |