问题
Is there a way ActionScript 3 can detect the user's screen resolution?
回答1:
have a look at stage.fullScreenHeight and stage.fullScreenWidth
回答2:
These will return the numbers to your output window:
trace(Capabilities.screenResolutionX);
trace(Capabilities.screenResolutionY);
回答3:
If you are on AIR, you could use the flash.display.Screen class, which contains this info, plus a lot more, such as color-depth, and multi-screen support.
回答4:
flash.system.Capabilities.screenResolutionY and flash.system.Capabilities.screenResolutionX
来源:https://stackoverflow.com/questions/1048566/how-do-i-get-the-users-screen-resolution-in-actionscript-3