topical media & game development

talk show tell print

actionscript-video-com-flashconnections-util-Trace.ax

actionscript-video-com-flashconnections-util-Trace.ax [swf] flex


  /*
  * 
  * Zarate - http://www.zarate.tv
  * cuentame@zarate.tv
  * 
  * This code is under a Creative Commons Attribution License
  * http://creativecommons.org/licenses/by/2.5/
  * 
  */
  package com.flashconnections.util
  {
          import flash.net.LocalConnection;
          import com.flashconnections.core.Core;
  
  	class @ax-actionscript-video-com-flashconnections-util-Trace extends Core
          {
                  public static var SINGLE_LINE:String = "__singleLine__";
                  
                  public static function trc():void
                  {
                          var sending_lc:LocalConnection = new LocalConnection();
                          var msg:String = "";
                          
                          if (arguments[arguments.length -1] != SINGLE_LINE) {
                                  for (var i:Number = 0; i < arguments.length; i++) {
                                          msg += arguments[i] + "\n\t\t\t";
                                  }
                          }
                          else {
                                  arguments.pop();
                                  for (var i:Number = 0; i < arguments.length; i++) {
                                          msg += arguments[i] + "  ";
                                  }
                          }
                          sending_lc.send("_ZLog","log", msg);
                          sending_lc.close();
                  }        
          }
  }


(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.