flashBugでFlashをデバッグする?
Firefoxのアドオン(機能拡張)であるFirebugの利用可能なメソッドを利用してブラウザ上でFlashのデバッグをしてしまおうと言うActionScriptクラスファイルが登場しました。
■作者のページからクラスファイルを含むFLAサンプルをダウンロード可能です。
任意のパスにクラスファイル(flashBug.as)置き、Flashから次のよなスタイルでコールします。
var console = new flashBug(true);
console.time("flashBug Total running time");
var foo = "bar";
console.info("This is some general information");
console.debug("Variable foo: "+foo);
console.warn("This has some important information");
console.error("Whoops, there has been an error!!!");
//----
原理としては、ExternalInterfaceを介してFirebugのconsoleメソッドに送ろうというものです。
Firebugの利用可能なメソッドの詳細はドキュメントページをご覧ください。
また、このクラスファイルがどのメソッドにアクセス可能かはクラスファイルの中身を読んでみてください。
