             Singleton.getInstance("mx.managers::ILayoutManager"));
         UIComponentGlobals.layoutManager.usePhasedInstantiation = true;
 
-        if (!ApplicationGlobals.application)
-            ApplicationGlobals.application = this;
+        if (!FlexGlobals.topLevelApplication)
+            FlexGlobals.topLevelApplication = this;
 
         super();
 

     *  Therefore we decided to dispense with strict typing for
     *  'application'.
     */
    public static function get application():Object
    {
        return ApplicationGlobals.application;
    }

    //--------------------------------------------------------------------------

    override public function get id():String
    {
        if (!super.id &&
            this == FlexGlobals.topLevelApplication && 
            ExternalInterface.available)
        {
            return ExternalInterface.objectID;
