I have an asp page that loads a response " user=exists " everytime I try to update a database record (when of course the record already exists!) How can I handle this resp开发者_如何学Conse with AS3 in Flash?
assuming you are using a URLLoader...
// Create a URLLoader to handle sending and loading
loader = new URLLoader();
// add listeners
if (!loader.hasEventListener( Event.COMPLETE)) {
loader.addEventListener( Event.COMPLETE, handleResponse);
}
// send the data to the URL
loader.load(request);
and then the handleResponse function
private function handleResponse(e:Event):void{
trace("Returned : " + new String(e.target.data));
}
e.target.data being the response,
hope this helps
精彩评论