Created
September 20, 2012 17:32
-
-
Save kylehill/3757235 to your computer and use it in GitHub Desktop.
Mass-quantity safe debugger for AS3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function emitter(... args):void { | |
| var output:Array = []; | |
| for (var param:Number = 0; param < args.length; param++) { | |
| try { | |
| if (getQualifiedClassName(args[param]) === "Array") { | |
| var obj = args[param][0]; | |
| if (obj == "splice") { | |
| obj = args[param][1] | |
| for (var level:Number = 2; level < args[param].length; level++) { | |
| obj = obj[level]; | |
| } | |
| } | |
| output.push(obj); | |
| } | |
| else { | |
| output.push(args[param]) | |
| } | |
| } | |
| catch (e:Error) { | |
| output.push("ERROR"); | |
| } | |
| } | |
| ExternalInterface.call("console.log", "Console Emitter: ", output); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment