 
 import mx.core.ILayoutElement;
 import mx.core.UIComponent;
+import mx.core.UIComponentGlobals;
 import mx.core.mx_internal;
+import mx.events.DynamicEvent;
 import mx.events.FlexEvent;
 import mx.managers.layoutClasses.PriorityQueue;
 


        var sm:ISystemManager = SystemManagerGlobals.topLevelSystemManagers[0]
		sm.removeEventListener(Event.ENTER_FRAME, waitAFrame);
		sm.addEventListener(Event.ENTER_FRAME, doPhasedInstantiation);
        waitedAFrame = true;

		// trace("<<LayoutManager:WaitAFrame");

		}
		else
		{
			sm.addEventListener(Event.ENTER_FRAME, doPhasedInstantiationCallback);
			if (!usePhasedInstantiation)
			{
				if (sm && (sm.stage || sm.useSWFBridge()))
				{
					sm.addEventListener(Event.RENDER, doPhasedInstantiationCallback);
					if (sm.stage)
						sm.stage.invalidate();
				}
