SHOW:
|
|
- or go back to the newest paste.
| 1 | package; | |
| 2 | import flash.display.Sprite; | |
| 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 |
| 10 | + | class TestDebuggerServer extends Sprite |
| 11 | {
| |
| 12 | var lc:LocalConnection; | |
| 13 | public function new() | |
| 14 | {
| |
| 15 | super(); | |
| 16 | ||
| 17 | lc = new LocalConnection(); | |
| 18 | lc.addEventListener(StatusEvent.STATUS,onStatus); | |
| 19 | lc.allowDomain("*");
| |
| 20 | lc.client = this; | |
| 21 | trace("try to connect...");
| |
| 22 | try{
| |
| 23 | lc.connect("_testosterone");
| |
| 24 | }catch(e:Dynamic){
| |
| 25 | trace("error : "+e.toString());
| |
| 26 | - | public function trace(str):Void |
| 26 | + | |
| 27 | } | |
| 28 | public function myTrace(str):Void | |
| 29 | {
| |
| 30 | trace(str); | |
| 31 | } | |
| 32 | private function onStatus(e:StatusEvent):Void{
| |
| 33 | trace(e.toString()); | |
| 34 | } | |
| 35 | - | new TestDebuggerServer(); |
| 35 | + | |
| 36 | {
| |
| 37 | flash.Lib.current.addChild(new TestDebuggerServer()); | |
| 38 | } | |
| 39 | } |