topical media & game development

talk show tell print

actionscript-lib-logger-OutputPanelView.ax

actionscript-lib-logger-OutputPanelView.ax [swf] flex


  package  {
    //import util.Observer;
    //import util.Observable;
    
    
An observer of the Logger class. When a movie is played in the Flash authoring tool's Test Movie mode, this class displays log messages in the Output panel.

  
    public class @ax-actionscript-lib-logger-OutputPanelView implements actionscript_lib_util_Observer {
      // The log that this object is observing.
      private var log:actionscript_lib_logger_Logger;
    
      
Constructor

  
      public function @ax-actionscript-lib-logger-OutputPanelView (l:actionscript_lib_logger_Logger) {
        log = l;
      }
    
      
Invoked when the log changes. For details, see the Observer interface.

  
      public function update (o:actionscript_lib_util_Observable, infoObj:Object):void {
        // Cast infoObj to a LogMessage instance for type checking.
        var logMsg:actionscript_lib_logger_LogMessage = actionscript_lib_logger_LogMessage(infoObj);
        trace(actionscript_lib_logger_Logger.getLevelDesc(logMsg.getLevel()) + ": " + logMsg.getMessage());
      }
    
      public function destroy ():void {
        log.removeObserver(this);
      }
    }
  }


(C) Æliens 27/08/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.