Resize your html5 build (ignore)

Hi. I made a build of a game with FlashDevelop for html5. Since the images are 1920x1080, in the Chrome browser it appears cut to 2/3 cause too large when tested but also when hosted it’s the same.
I tried using some codes to rescale the screen but nothing changed it. So in my Main.hx

These are just try outs so nothing has to be like that.

	public function SetScreen()
        if (Lib.current.stage.displayState != StageDisplayState.FULL_SCREEN_INTERACTIVE )
            //Lib.current.stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;
			var currentWindowWidth : Float;
			var currentWindowHeight : Float;
			var widthRatio : Float;
			var heightRatio : Float;
            //check window height and width and calculate ratio    
            currentWindowWidth  = Lib.current.stage.stageWidth;
            currentWindowHeight =  Lib.current.stage.stageHeight;	
            widthRatio = currentWindowWidth / 1920;
            heightRatio = currentWindowHeight / 960;	//makes no difference what i set here	
			stage.scaleX = widthRatio;
            stage.scaleY = heightRatio;


I also edited project.xml to set width and height to 0 but nothing changed. I resize without resizing all buttons and stuff I hope?

<window width="1000" height="100" fps="60" hardware="true" allow-shaders="true" require-shaders="true" resizable="false"/> - maybe resizable="false" will help in here?

This cuts the display and the rest is black. Unless I need too modify something else in the sizes or stage width height?

So what do you exactly want to achieve? If you have like a 1920x1080 BG which has 2x 200x200 buttons placed on top and you want only that BG to scale down when resizing window (or opening in Chrome where the visible container is less than 1920x1080) I guess you have to do that manually (scale some, do not scale the others). If you approach this like you’ve shown on that sample code, you resize stage and everything that is it’s child so basically everything.

Also you’ve set like 960x scale in here so that is probably a little bit too much ? Unless your stage is like 1x1 or 5x5 - it’s 4800 with 960 but I guess these are just to test whether scaling works.

I guess you can always listen for an event Event.RESIZE which is dispatched by the Stage whenever window gets resized. Maybe then you can adjust what you actually want to.