2012-04-04 5 views
0

Ich habe ein solches Problem: auf dem Gerät mit Android OS, führe ich Action-Skript-Code. Und ich habe eine Methode, die einige Daten an Server senden muss. Aber!!! Selbst wenn ich meine Anwendung stoppe, bevor ich einige Daten an den Server sende, werden die Daten trotzdem irgendwie gesendet. Ich verstehe nicht, wie es sein kann ?? Wer ist mit diesem Problem konfrontiert? Bitte hilf mir. Vielen Dank.ungewöhnliche Callback Calling

public class VerifyCommand extends SimpleCommand 
    { 


     override public function execute(notification:INotification):void 
     {  
      //here is the place, where I put breakpoint and stop the program 
      trace("here is the place, where I put breakpoint and stop the program"); 
      verify(); 
     } 

     private function verify():void 
     { 
      var tempError:Error = new Error(); 
      var stackTrace:String = tempError.getStackTrace(); 
      trace(stackTrace); 

      var request : URLRequest = new URLRequest(); 
      request.url = "http://www.somesite.com"; 

      request.method = URLRequestMethod.POST; 
      request.contentType = "application/x-www-form-urlencoded; charset=utf-8"; 
      request.data = variables; 
      request.useCache = false; 
      request.cacheResponse = false; 

      var call_loader:URLLoader = new URLLoader(); 
      call_loader.dataFormat = URLLoaderDataFormat.TEXT; 
      call_loader.addEventListener(Event.COMPLETE, onVerificationResult); 
      call_loader.addEventListener(IOErrorEvent.IO_ERROR, onVerificationError); 
      call_loader.load(request); 
     } 

     private function onVerificationResult(event:Event):void 
     { 
      trace("all ok"); 
     } 

     private function onVerificationError(event:Event):void 
     {  
      trace("all failed"); 
     } 
} 

Antwort

0

Es war ein Debugger Fehler, es hört nicht genau auf, wo ich denke, es sollte.