 import flash.events.IEventDispatcher;
 import flash.events.IOErrorEvent;
 import flash.events.ProgressEvent;
+import flash.system.ApplicationDomain;
 import mx.events.ResourceEvent;
 import mx.events.RSLEvent;
 import mx.resources.IResourceManager;
-import mx.resources.ResourceManager;
 
 [ExcludeClass]
 


	//--------------------------------------------------------------------------
	//
	//  Constructor
	//
	//--------------------------------------------------------------------------

	    chainedSecurityErrorHandler = securityErrorHandler;
	    chainedRSLErrorHandler = rslErrorHandler;
	    
		if (!resourceManager)
		{
			// do this to prevent dependency on ResourceManager
			if (appDomain.hasDefinition("mx.resources::ResourceManager"))
			{
				var resourceManagerClass:Class = 
					Class(appDomain.getDefinition("mx.resources::ResourceManager"));
				resourceManager = 
					IResourceManager(resourceManagerClass["getInstance"]());
			}
			else
				return;
		}

		
		var eventDispatcher:IEventDispatcher =
			resourceManager.loadResourceModule(url);
