     //--------------------------------------------------------------------------
 
     /**
+     *  @private
+     *  
+     *  Get the definition of a class, namespace, or function. The defintion is
+     *  obtained from the specified moduleFactory. If there is no moduleFactory,
+     *  then the definition of looked up in ApplicationDomain.currentDomain.
+     * 
+     *  @param name name of the class, namespace, or function to get.
+     *  @param moduleFactory The moduleFactory that specifies the application 
+     *  domain to use to find the name. If moduleFactory is null, then
+     *  ApplicationDomain.currentDomain is used as a fall back.
+     * 
+     *  return a class, namespace, or function. 
+     * 
+     */ 
+    mx_internal static function getDefinition(name:String, moduleFactory:IFlexModuleFactory):Object
+    {
+        var currentDomain:ApplicationDomain;
+        
+        // Use the given module factory to look for the domain. If the module 
+        // factory is null then fall back to Application.currentDomain.
+        if (moduleFactory)
+            currentDomain = moduleFactory.info()["currentDomain"];
+        else
+            currentDomain = ApplicationDomain.currentDomain;
+
+        if (currentDomain.hasDefinition(name))
+            return currentDomain.getDefinition(name);
+        
+        return null;
+    }
+    
+    /**
      *  Method for supporting state Accessibility.
      *  Returns true if an ancestor of the component has enabled set to false.
      */

import flash.accessibility.Accessibility;
import flash.accessibility.AccessibilityImplementation;
import flash.accessibility.AccessibilityProperties;
import flash.display.DisplayObjectContainer;
import flash.events.Event;

import mx.accessibility.AccConst;
import mx.containers.Form;
import mx.containers.FormHeading;
import mx.containers.FormItem;
import mx.controls.Label;
import mx.core.Container;
import mx.core.UIComponent;
import mx.core.mx_internal;
import mx.managers.SystemManager;
import mx.resources.ResourceManager;
import mx.resources.IResourceManager;


        // keeping this DisplayObjectContainer since parent returns
        // that as root is not a UIComponent.
        var par:DisplayObjectContainer = component.parent; 

        // continue looking up the parent chain
        // until a disabled UIComponent is found
		// stopping at the root or system manager
        while (par && (par is UIComponent && UIComponent(par).enabled) &&
               !(par is ISystemManager) && par != component.root)
        {
            par = par.parent;
        }
