   import flash.display.StageAlign;
   import flash.display.BitmapData;
   import flash.display.Loader;
+  import flash.events.ErrorEvent;
   import flash.events.Event;
   import flash.events.IOErrorEvent;
+  import flash.events.UncaughtErrorEvent;
   import flash.text.TextField;
   import flash.system.Security;
   import flash.geom.Point;

      delete textureMap[id];
    }
  }
}
        debug('createLayer: ' + id + ' already exists');
        return;
      }

      var layer:Sprite = new Sprite();

      layerMap[id] = layer;
