Flex 和多显示器支持
我遇到一种情况,我的 Flex 应用程序需要检测多显示器及其各自的分辨率和位置。
到目前为止,我已经尝试使用JavaScript代码来确定屏幕的宽度/高度比; 精确细节
- 然而,它缺乏有关每个显示器分辨率的
- ;他们各自的位置;
- 并且宽度/高度比不能保证任何东西,因为许多显示器可能是宽屏显示器,
我已经被这种情况困扰了近一周,但我仍然无法找到可能的解决方法。欢迎所有解决方法,只是我不打算安装随后与我的 Flex 应用程序通信的应用程序(即 AIR 桌面,用于 Flex 基于 Web 的应用程序)。
2011-08-23
我终于使用Java小程序和JavaScript解决了这个问题。这样,我就可以使用 FAbridge 来获取 JavaScript 中获得的值。
I have a situation where my Flex application will need to detect multi-monitors and their respective resolutions and positions.
So far, I have tried using JavaScript code to determine the width/height ratio of the screen; however, it lacks precise details about
- the resolution of each of the monitors;
- their respective locations;
- and the width/height ratio does not guarantee anything since many monitors could be wide-screen monitors
I have been stuck with this situation for almost a week now and I still couldn't figure out a possible workaround. All workarounds are welcome, only that I do not intend to install applications that would then communicate with my Flex application (that is, AIR desktop for Flex web-based applications).
2011-08-23
I finally solved this problem using a Java applet and JavaScript. With that, I can use FAbridge for the values obtained in the JavaScript.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我尝试查看 Flash Player 11 预发行文档以获取 Molehill/GPU 访问信息。您可能想查看您自己版本的文档并进行实验。
如果成功,您可以尝试通过数学来推断他们有多少个显示器。就我而言,我的 screenResolutionX = 3360px 这意味着我有两个 1680 x 1050 显示器。推断具有混合尺寸的显示器的显示器尺寸很难猜测,但这是可以做到的。您只需要弄清楚组合的排列即可。我读到的任何内容都没有提及它们的位置,因此您可能希望应用程序基于左上角 (0,0),而不是相对于中间。
您遇到的非常有趣的困境,迫使我们跳出框框进行思考...Flash Player 舞台框。
I tried look into the Flash Player 11 Pre-release documentation for Molehill/GPU access information. You might want to look in your own version of the docs and experiment with
If it works out, you try to infer how many monitors they have by doing the math. In my case my screenResolutionX = 3360px which would mean I have two 1680 x 1050 displays. Inferring displays sizes for sets with mixed sizes of monitors will be a b!tch to guess but it can be done. You'll just have to figure out the permutations of the combinations. Nothing I read says anything about their locations, so you might want to work with your app to be top left corner (0,0) based rather than relative to the middle.
Very interesting dilemma you have, forces us to think out of the box...the Flash Player stage box that is.