Often, when projects become bigger and more complicated, it often is necessary gto let the application behave different when exported within the IDE and the actual LIVE project. I use this snippet, right at the beginning of my baseclass, to define in which environment the flash client is running:

Actionscript:
  1. if(stage.loaderInfo.url.indexOf("file:") != -1){
  2.     _configXmlPath = "config.xml";
  3.        trace("local file");
  4. }else {
  5.     trace("Server");
  6.     domain = URLUtils.getDomain( stage.loaderInfo.url);
  7. }

I hope this is seflexpainatory.