In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

helpMeタグ

Firebugのコンソールに出せない
Get Adobe Flash player
by hacker_alqfxqhw 13 Mar 2009
//Firebugのコンソールに出せない
package {
    import flash.external.ExternalInterface;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            //graphics.drawRect(0, 0, 100, 100);
            //graphics.endFill();
            ExternalInterface.call('console.log', 'aaa');
            log("aaa");
        }
    }
}
//http://subtech.g.hatena.ne.jp/secondlife/20070219/1171872801
  import flash.external.ExternalInterface;
  import flash.utils.getQualifiedClassName;
  function log(... args):void {
    var inspect:Function = function(a:*):String {
      switch(getQualifiedClassName(a)) {
        case 'Array':
          var r:Array = [];
          for (var i:uint=0;i<a.length;i++)
            r.push(inspect(a[i]));
          return '[' + r.join(', ') + ']';
        case 'int': case 'uint': case 'Number':
          return a.toString();
        case 'String':
          return a;
      }
      return '#<'+getQualifiedClassName(a)+':'+String(a)+'>';
    }
    var r:String = inspect(args, false);
    trace(r)
    ExternalInterface.call('console.log', r);
  }