How do I get the user's screen resolution in ActionScript 3?

空扰寡人 提交于 2019-12-20 23:25:11

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!