2015-05-21 14:58:38 -05:00
|
|
|
package
|
|
|
|
|
{
|
|
|
|
|
import flash.external.ExternalInterface
|
|
|
|
|
|
|
|
|
|
public class Logger {
|
|
|
|
|
private static const DEBUG:uint = 0
|
|
|
|
|
|
|
|
|
|
public static function alert(msg:String):void
|
|
|
|
|
{
|
|
|
|
|
var str:String = "";
|
2015-05-26 15:18:01 -05:00
|
|
|
|
|
|
|
|
if (DEBUG == 1)
|
|
|
|
|
str += msg;
|
2015-05-21 14:58:38 -05:00
|
|
|
|
|
|
|
|
if(ExternalInterface.available){
|
|
|
|
|
ExternalInterface.call("alert", str);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static function log(msg:String):void
|
|
|
|
|
{
|
|
|
|
|
var str:String = "";
|
2015-05-26 15:18:01 -05:00
|
|
|
|
|
|
|
|
if (DEBUG == 1)
|
|
|
|
|
str += msg;
|
2015-05-21 14:58:38 -05:00
|
|
|
|
|
|
|
|
if(ExternalInterface.available){
|
|
|
|
|
ExternalInterface.call("console.log", str);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|