title: Creating a custom trace() class in AS3
body: <p>I got this idea of expanding my trace() messages.  </p>
  
  <p><strong>Why</strong></p>
  
  <p>trace() is all over my code, I want to turn them on/off by a simple command and maybe add some sort of priority functionality to the trace(),  i.e. </p>
  
  <pre><code>myTrace.TraceMsg("loosehere",debugme, 0);
  myTrace.TraceMsg("winhere",debugme, 1);  
  </code></pre>
  
  <p>And when I run, only the one with the higher priority, "1" in this case, shows.</p>
  
  <p>There is a lot more functionality I would like to add as well, like logging messages to file and so on.</p>
  
  <p><strong>Problem</strong></p>
  
  <p>How do trace() work? -Is it possible to overload trace() somehow?  -How would I implement the custom TraceMsg(what code here?) method? </p>
  
  <p>Having some serious problems finding info on this subject on our favourite search engine, so any help would be appreciated.</p>