0

我在下面有这段代码,我需要什么才能能够登录FireFox/FireBug

package {
  import flash.display.Sprite;
  import flash.external.ExternalInterface;

  public class FlashRecorder extends Sprite {
    public function FlashRecorder() {
      var logger:Logger;
      logger = new Logger();
      ExternalInterface.addCallback("debugLog", logger.debugLog);
      var recorder = new Recorder(logger);
      recorder.addExternalInterfaceCallbacks();
    }
  }
}

这样,当我这样做时:

logger.log('startPlaying');

它将登录到 Firefox/firebug

4

2 回答 2

1

要使用 FireBug 登录,您只需使用:console.log,详细信息请参见http://michaelsync.net/2007/09/30/firebug-tutorial-script-tab-javascript-debugging

于 2012-10-25T02:36:43.220 回答
1

就调试而言,您有很多选择,这里有一些选择。

AS3

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/package.html#trace ()

http://www.as3commons.org/as3-commons-logging/

http://nochump.com/blog/archives/24

http://code.google.com/p/flash-tracer/

http://demonsterdebugger.com/

    private function logToBrowserConsole(somethingToLog:String):void
    {
        ExternalInterface.call("console.log", somethingToLog);
    }

弹性 3+

http://livedocs.adobe.com/flex/3/html/help.html?content=logging_09.html

http://code.google.com/p/fxspy/

于 2012-10-25T02:48:49.807 回答