海正試圖訪問aspx變量。但我不能做到這一點。我不知道如何解決我的問題。任何人善意地幫助我。使用閃光專業cs5。如何在Flash中從aspx頁面訪問值?
import flash.net.URLRequest;
import flash.net.URLVariables;
import flash.net.URLRequestMethod;
import flash.events.Event;
var myRequest:URLRequest = new URLRequest();
var myVariables:URLVariables = new URLVariables();
var myLoader:URLLoader = new URLLoader();
myRequest.url = "http://xxxx";
myRequest.method = URLRequestMethod.POST;
myLoader.addEventListener(Event.COMPLETE, sendComplete);
myLoader.load(myRequest);
function sendComplete(e:Event):void{
trace(myLoader.load(myRequest));
}
您需要將ASPX變量作爲隱藏標記寫入文檔,然後通過在ActionScript中調用JavaScript來提取它。檢查[ExternalInterface](http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/external/ExternalInterface.html) – 2012-01-04 05:01:19
你能指導我這個領域的新手嗎? – Mercy 2012-01-04 05:09:10