Guest User

Untitled

a guest
Sep 3rd, 2012
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package;
  2.  
  3. import flash.events.Event;
  4. import flash.events.IOErrorEvent;
  5. import flash.events.StatusEvent;
  6. import flash.external.ExternalInterface;
  7. import flash.net.LocalConnection;
  8. import flash.net.XMLSocket;
  9.  
  10. class TestDebuggerServer
  11. {
  12.     var lc:LocalConnection;
  13.     public function new()
  14.     {
  15.         lc = new LocalConnection();
  16.         lc.addEventListener(StatusEvent.STATUS,onStatus);
  17.         lc.allowDomain("*");
  18.         lc.client = this;
  19.         trace("try to connect...");
  20.         try{
  21.             lc.connect("_testosterone");
  22.         }catch(e:Dynamic){
  23.             trace("error : "+e.toString());
  24.         }
  25.     }
  26.     public function trace(str):Void
  27.     {
  28.         trace(str);
  29.     }
  30.     private function onStatus(e:StatusEvent):Void{
  31.         trace(e.toString());
  32.     }
  33.     static function main()
  34.     {
  35.         new TestDebuggerServer();
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment