 import mx.core.mx_internal;
 import mx.events.FlexEvent;
 import mx.events.PropertyChangeEvent;
+import mx.events.ResizeEvent;
 
 import spark.core.ContainerDestructionPolicy;
 import spark.events.ViewNavigatorEvent;

    /**
     *  @private
     */ 
    private function stage_orientationChangeHandler(event:StageOrientationEvent):void
    {
        if (isActive)
			updateOrientationState();

        removeEventListener(FlexEvent.CREATION_COMPLETE, creationCompleteHandler);
        
        // Create a weak listener so stage doesn't hold a reference to the view
        FlexGlobals.topLevelApplication.addEventListener(ResizeEvent.RESIZE, 
            application_resizeHandler, false, 0, true);
        
        updateOrientationState();
    }
    
    //--------------------------------------------------------------------------
