             {
                 super.percentHeight = Math.max(percentHeight, 0);
                 super.percentHeight = Math.min(percentHeight, 100);
-                h = percentHeight*screen.height/100;
+                
+                if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_0)
+                    h = percentHeight * DisplayObject(systemManager).height/100;
+                else
+                    h = percentHeight * screen.height/100;
             }
             
             if (!isNaN(explicitMaxHeight))

            {
                super.percentWidth = Math.max(percentWidth, 0);
                super.percentWidth = Math.min(percentWidth, 100);
                w = percentWidth*screen.width/100;
            }

            if (!isNaN(explicitMaxWidth))

        // the application will not resize.
        // If developer has specified percent width/height,
        // application will resize to the required value
        // based on the current SystemManager's width/height.
        // If developer has specified min/max values,
        // then application will not resize beyond those values.

