有没有办法检测 Flex 4 中的屏幕分辨率?
我想制作一个应用程序,其图像仅反弹到用户屏幕分辨率。如何在 Flex 4 中检测用户的屏幕分辨率? (如果可以的话就是这样。)
I want to make an application with an image that only bounces to the users screen resolution. How can I go by detecting the users screen resolution in flex 4? (If you can that is.)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
来自 http://www.sapethemape.com/2009/01 /Detecting-screen-resolution-in-flexair/,看起来您可以使用
Capability.screenResolutionX
和Capability.screenResolutionY
。示例:
From http://www.sapethemape.com/2009/01/detecting-screen-resolution-in-flexair/, it looks like you can use
Capabilities.screenResolutionX
andCapabilities.screenResolutionY
.Example:
要查找多个显示器的分辨率,可以循环遍历 Screen.screens 数组,然后获取每个显示器屏幕的边界矩形。通常,AIR 从左到右计数(0 索引最右边的显示器),但我尚未在每个显示器配置上对此进行测试。
To find the resolution of multiple monitors, you can loop through the Screen.screens array and then get the bounding rectangle of each monitor screen. Typically AIR counts from left to right (0 index the right most monitor) but I haven't tested this on every monitor configuration.