hey I'm trying to build this simple debugger class so i can see flash vars inside the browser console and if I'm testing it inside the flash ide i will get the good old tracer. But for some reason ExternalInterface.available
returns true
inside the Flash ide!?
package libs
{
import flash.external.ExternalInterface;
public class debug
{
public function tracer(variable:*):void
{
if(ExternalInterface.available)
{
if(variable is String)
{
variable = '"'+variable+'"';
}
ExternalInterface.call('console.log(' + variable + ')');
}
else
{
trace(variable);
}
}
}
}