Flash Logger Demo

FlashLogger makes it possible to log from Flash ActionScript to a JavaScript API that allows you to easily turn logging on and off, without having to edit your SWFs. It is a great tool for ActionScript and JavaScript programmers alike. For more information, check out the Google Code site for FlashLogger.

NOTE: This page is configured to automatically open the Flash Logger console. Normally it does not automatically open and you would open it with shift+c, the default shortcut key.

NOTE: This page is configured to force all logs sent via the API to the Flash Logger console. This means calling $FL().log('hello') will show up in the Flahs Logger console, not in FireBug, even if you have FireBug active. FireBug's console.* methods will still send data to it when it is active. Normally the Flash Logger Console won't even load if FireBug is detected and active (it and it's CSS definitions are kept in a seperate file.)

Flash Demo

This demo allows you to test sending various types of data from Flash to the Flash Logger JavaScript API.

Note: The errors area should stay blank, but if Flash were to report that the ExternalInterface was not ready, or if the Log class can't find the Flash Loader JavaScript API, then an error will show there.
The error message is part of the testing Flash Movie, not the Log Class. It is calling the Log Class' eiReady() method. This method simply returns -1 if ExternalInterface is not ready, -2 the JavaScript API can't be found, or 1 if it is there. You do not need to do this, but can use it to see what is going wrong if your logs aren't showing up in the console.

JavaScript Demo

The buttons below all use the $FL().* methods to communicate with the console. These methods mimic the firebug console, except that with Flash Logger, you can pass an optional "instance key" to $FL(). Doing so creates a new instance of the Logger, with it's own settings (primarily on/off.) This allows you to section off your debugging statements by some sort of key. You can then just turn on/off what you need.

Main Logger ($FL())



Test Logger ($FL('js-test'))



Flash Loggers




The buttons below all use the console.* methods to communicate with the console. These are here only to show that they work, the prefered way of using Flash Logger is described above.
When FireBug is not active, these methods will log to the main FlashLogger (ie, $FL()).
Note: You'll need to turn on the main FlashLogger (above) to see these work without FireBug being active.

console.* Methods