2015-06-09 20:46:21 +00:00
|
|
|
package
|
|
|
|
{
|
|
|
|
import flash.external.ExternalInterface
|
|
|
|
|
|
|
|
public class Logger {
|
2015-06-09 21:01:29 +00:00
|
|
|
private static const DEBUG:uint = 0
|
2015-06-09 20:46:21 +00:00
|
|
|
|
|
|
|
public static function alert(msg:String):void
|
|
|
|
{
|
|
|
|
var str:String = "";
|
|
|
|
|
|
|
|
if (DEBUG == 1)
|
|
|
|
str += msg;
|
|
|
|
|
|
|
|
if(ExternalInterface.available){
|
|
|
|
ExternalInterface.call("alert", str);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public static function log(msg:String):void
|
|
|
|
{
|
|
|
|
var str:String = "";
|
|
|
|
|
|
|
|
if (DEBUG == 1)
|
|
|
|
str += msg;
|
|
|
|
|
|
|
|
if(ExternalInterface.available){
|
|
|
|
ExternalInterface.call("console.log", str);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|