 
     /**
      *  @private
+     *  Get the parent module factory. 
+     * 
+     *  @param moduleFactory The module factory to get the parent of.
+     * 
+     *  @return the parent module factory if available, null otherwise. 
+     */
+    private static function getParentModuleFactory(moduleFactory:IFlexModuleFactory):IFlexModuleFactory    
+    {
+        var request:Request = new Request(Request.GET_PARENT_FLEX_MODULE_FACTORY_REQUEST);
+        DisplayObject(moduleFactory).dispatchEvent(request); 
+        return request.value as IFlexModuleFactory;
+    }
+    
+    /**
+     *  @private
      *  Resolve the application domain target. 
      * 
      *  @param rsl to resolve.

                currentModuleFactory = moduleFactory;
                while (currentModuleFactory != topLevelModuleFactory)
                {
                    var request:Request = new Request(Request.GET_PARENT_FLEX_MODULE_FACTORY_REQUEST);
                    DisplayObject(currentModuleFactory).dispatchEvent(request); 
                    currentModuleFactory = request.value as IFlexModuleFactory;
                    
                    // If we couldn't get the parent module factory, then we 
                    // will have to load into the highest application domain

                    }
                } 

                // If the rsl is already loaded or already resolved then
                // skip resolving it.
                if (!loaded[rsl] && resolved[rsl] == null)
                {
                    // Get the parent module factory if we are going to need to 
                    // resolve the application domain target.
                    if (!parentModuleFactory && 
                        RSLData(rsl[0]).applicationDomainTarget == ApplicationDomainTarget.PARENT)
                    {
                        parentModuleFactory = getParentModuleFactory(moduleFactory);           
                    }
                    
                    // Resolve the application domain target.
                    if (resolveApplicationDomainTarget(rsl,
                            moduleFactory,
                            currentModuleFactory,
                            parentModuleFactory,
                            topLevelModuleFactory))
                    {
                        resolved[rsl] = 1;
                        resolvedLength++;                        
                    }
                }
            }
            
