Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get the screen size in Air?

In AS3 code for Air, how can I get the screen width and height of the mobile device its running on?

like image 899
panthro Avatar asked Nov 30 '22 03:11

panthro


1 Answers

If you use emulators on the desktop, Capabilities will return the resolution of you computer but not of emulated device.
Just simply use stage for this:

trace(stage.fullScreenWidth, stage.fullScreenHeight);

like image 176
walv Avatar answered Dec 09 '22 10:12

walv