I’m using openfl 4.8.1 and lime 3.7.4 for html5 games.
Lib.current.stage.stageHeight and Lib.current.stage.stageWidth not working after I rotate the iOS mobile device while in Preloader.hx class at iOS Mobile Browser. Lib.current.stage.stageHeight and Lib.current.stage.stageWidth return same value with before I rotate it.
Lib.current.stage.stageHeight and Lib.current.stage.stageWidth working fine at Preloader android browser and pc browser.
So It’s only work once at iOS when first load preloader only. If I rotate it the mobile device, Lib.current.stage.stageHeight and Lib.current.stage.stageWidth always return same value with before I rotate it.
After Main class loaded Lib.current.stage.stageHeight and Lib.current.stage.stageWidth working fine on iOS browser
I need Lib.current.stage.stageHeight and Lib.current.stage.stageWidth to handle screen rotation on mobile at preloader screen.
Can you tell if your canvas is being resized as well?
Perhaps we need to listen to the root DOM element (such as the target DIV) rather than the page resizing, so if our target element resizes, we respond that way
That’s why I need to know the width and height browser window after rotate it.
Perhaps we need to listen to the root DOM element (such as the target DIV) rather than the page resizing, so if our target element resizes, we respond that way
I don’t know what to do. Should we ask the lime team?
Previously, a resize occurred only on a window resize. Now it will occur if the parent element is resized, so if you change the CSS on the parent DIV (for example) it will resize. A rotation event should resize a 100% x 100% element, which should now trigger a window resize event