I've been researching for days on the issude but till now I still haven found a solution yet.
I have 0 knowledge on ASP. And I just want to able to pass and get var/text from ASP.
Anyone kind enuff to guide me how I can furthur from here?
private function loadASP():void {
var aspSend:URLRequest=new URLRequest("testASP.asp");
var aspLoader:URLLoader = new URLLoader();
aspLoader.load(aspSend);
trace("did send");
//aspLoader.addEventListener(Event.COMPLETE, processASP);
}
private function processASP(e:Event):void {
}
Best Answer
Why have you commented the call to
addEventListener
method? Uncomment it (and move it up two lines so that it comes before theload
call). If the url is correct, theprocessASP
method will be called when the response arrives (in a real life application, make sure you listen for ioError and securityError on the URLLoader - check the link for examples on doing this). You can read the response ase.target.data
in theprocessASP
method.URLLoader
can also be used to send data to the asp page (server).