Hello,
This has been driving me really crazy and I would be really happy if you guys have a solution for this. And I’m pretty sure there are many people out there trying to deal with the same problem, wishing there is a simple way. So here it goes:
I can’t fit the stage to the white area which is shown when you open the non-scrollable page for testing.
My browser zoom is 125% by default - which is very common - and I use Google Chrome. I tried adding:
<window width="0" height="0" />
to my project.xml. And I also added:
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
Still doesn’t work. What I do when I initialize my project is to put a button to the bottom left corner with this:
stageWidth = stage.stageWidth;
stageHeight = stage.stageHeight;
buttonWidth = stageWidth/8;
buttonHeight = stageHeight/10;
buttonX = 0;
buttonY = stageHeight - buttonHeight;
Then of course I create my button instance with few more parameters for colour etc. and “addChild” to stage.
What happens is:
- Stage dimensions are shown “1920x969” with 100% browser zoom.
- Stage dimensions are shown “1536x775” with 125% browser zoom.
- My button is out of bounds using both options as default browser zoom.
How do you guys get through this problem?