Simple Flash to browser console logging
If you are like me, you like to be able to trace out commands etc from Flash into your browser container. I generally use FlashTracer on Firefox or a more full featured debugger.
However, sometimes I simply want to trace elements into the console of either Safari or Firefox. This is as simple as using ExternalInterface and a small javascript method that takes a single parameter and writes it to the browsers console, via console.log(). Which can then be inspected via Safari’s debug panel or within Firebug on Firefox. And yes, I realise I could use Flashbug or something similar, but to be honest, I hardly ever use Firefox, hence the desire for something that works in Safari.
Simple example file is attached.
Source files
Simple Flash logging (1258)

July 15th, 2010 at 12:11 pm
nice! works with chrome too btw
thx mate!
July 20th, 2010 at 2:46 am
@freemind,
How you can use this in Google Chrome?
July 20th, 2010 at 2:59 am
Ok I found it!
From the Javascript Console menu (CTRL+Shift+J)
May 6th, 2011 at 1:41 pm
Hi Dale, check my solution : http://burnandbass.com/debug/ to this problem, the class also shows the fps/memory
June 21st, 2011 at 12:29 pm
Theres an easy way from within flash.
import flash.external.ExternalInterface;
_root.debug = function( str ){
ExternalInterface.call(‘console.log’,str );
}
then just call _root.debug( your_message ); whenever you want.
No need for extra javascript on your page.
June 26th, 2011 at 4:17 pm
Nice approach. Cheers.