      */        
     private function Stage_resizeHandler(event:Event):void
     {
+        // This method will prepare the splash screen and create a
+        // new instance if needed
+        prepareSplashScreen();
+
         if (!splashImage)
             return;
 
         // Current stage orientation
-        var orientation:String = stage.deviceOrientation;
+        var orientation:String = stage.orientation;
 
         // DPI scaling factor of the stage
         var dpiScale:Number = this.root.scaleX;

    private var splashImage:DisplayObject;      // The splash image
    private var splashImageWidth:Number;        // original pre-transform width
    private var splashImageHeight:Number;       // original pre-transform height
    
    /**
     *  @private
     *  The resize mode for the splash image
     */
    private var scaleMode:String = "none";      // One of "none", "stretch", "letterbox" and "zoom".

    /**
     *  @private 
     *  Minimum time for the image to be visible 
     */    
    private var minimumDisplayTime:Number = 1000;  // in ms
    private var checkWaitTime:Boolean = false;  // obey minimumDisplayTime only valid if splashImage is valid
    private var displayTimeStart:int = -1;      // the start time of the image being displayed
    
    //--------------------------------------------------------------------------
    //

{
    
import flash.display.DisplayObject;
import flash.display.Sprite;
import flash.display.StageOrientation;
import flash.events.Event;
import flash.events.StageOrientationEvent;
import flash.geom.Matrix;
import flash.system.Capabilities;
import flash.utils.getTimer;

import mx.core.RuntimeDPIProvider;
import mx.core.mx_internal;
import mx.events.FlexEvent;
import mx.managers.SystemManager;
import mx.preloaders.IPreloaderDisplay;
import mx.preloaders.Preloader;

use namespace mx_internal;

/**
 *  The SplashScreen class is the default preloader for Mobile Flex applications.
