         {
             _layoutDebugHelper = new LayoutDebugHelper();
             _layoutDebugHelper.mouseEnabled = false;
-            FlexGlobals.topLevelApplication.systemManager.addChild(_layoutDebugHelper);
+            var sm:ISystemManager = SystemManagerGlobals.topLevelSystemManagers[0]
+            sm.addChild(_layoutDebugHelper);
         }
         return _layoutDebugHelper;
     } */

		if (!usePhasedInstantiation)
		{
			var infiniteLoopGuard:int = 0;
			while (callLaterPending && infiniteLoopGuard++ < 100)
				doPhasedInstantiation();
		}
	}

				validateProperties();

				// The Preloader listens for this event.
				sm.document.dispatchEvent(
					new Event("validatePropertiesComplete"));
			}

