See trace() of Flash when running in browser

前端 未结 9 1058
天命终不由人
天命终不由人 2020-12-23 14:55

What\'s an easy way to see the trace() output of Flash/Flex movies when running in any browser?

9条回答
  •  悲哀的现实
    2020-12-23 15:02

    i just use the console.log function (most recent browsers implement it);

    import flash.external.ExternalInterface;
    
    public static function log(msg:String, caller:Object = null):void{
            var str:String = "";
            if(caller){
                str = getQualifiedClassName(caller);
                str += ":: ";
            }
            str += msg;
            trace(str);
            if(ExternalInterface.available){
                ExternalInterface.call("console.log", str);
            }
        }
    

提交回复
热议问题