public class Logger { public static function log(message:String):void { if (ExternalInterface.available) ExternalInterface.call("console.log", text); else trace(text); } }
Now use
Logger.log
instead of default trace
function and you can see all trace messages directly in browser console (i.e. Google Chrome's JavaScript console). It can be very useful!
No comments:
Post a Comment