Is it possible to detect screensize with open-fl?

How should i detect device’s screensize with open fl ? Or would i need to manage getting the information using other library ?
However, even if i get such information, how can i insert it into the output generated by Open-Fl . In flash, i generally use External Interface to get information by JS.

You can use Lib.current.stage.stageWidth and Lib.current.stage.stageHeight to detect screensize.

It is possible to do with screenResolutuionX and screenResolutionY properties of flash.system.Capabilities class.

Check out this thread Capabilities.screenResolutionX / Y wrong on android device with onScreen button
Alex explains differences betweens stageWidth/Height and screenResolutionX/Y.

1 Like

Thanks for the answers. Will look into them soon.