often you need different settings whether you are working within your IDE environment during development, or when the swf is actually put LIVE. I have tried many variants of passing DEBUG=true or similar, but found that this one is the most elegant one:

Actionscript:
  1. //checking whther client is online or within IDE
  2.             if(stage.loaderInfo.url.indexOf("file:") != -1){
  3.                 trace("Lokal");
  4.                 _debug = true;
  5.             }else {
  6.                 trace("Server");
  7.                 _debug = false;
  8.             }