Console Logging for Flash (i.e. Tracing in a browser)
Monday, May 26th, 2008If you want to trace something in flash but you want to load the flash in a browser, you can rework your trace statements to display them with the Firebug extensions.
Instead of using trace() you can use the following:
var flash_variable = ‘testing 123′;
getURL(”javascript: console.log(’”+ flash_variable +”‘)”,”_self”);
These statements will appear in the Firebug console inside Firefox. For more options, you can view the full capabilities of the console: www.getfirebug.com/console.html
You could create a new function that automatically traces to both sources, but make sure it is not switched on by default, or it could cause problems and expose data to maliscious users. AP


