 		if (isDispatchingResizeEvent)
 			return;
 
-		var w:Number;
-		var h:Number;
+                var w:Number = 0;
+                var h:Number = 0;
                 var m:Number;
                 var n:Number;
                 

        // the sandbox root and align to StageAlign.TOP_LEFT.                        
        try 
        {
            w = stage.stageWidth;
            h = stage.stageHeight;
            if (stage)
                align = stage.align;
        }
        catch (error:SecurityError)
        {

			{
				var n:int = forms.length;
				var p:DisplayObject = DisplayObject(event.target);
                                var isApplication:Boolean = document.rawChildren.contains(p);
				while (p)
				{
					for (var i:int = 0; i < n; i++)
