如何适应Flex AIR应用程序以全屏幕?

编程入门 行业动态 更新时间:2024-10-26 18:20:02
本文介绍了如何适应Flex AIR应用程序以全屏幕?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个AIR应用程序中的Flex专为1280×800,我想伸展到工作全屏幕1920x1200的显示器上。

I have an Air Application in Flex designed for 1280x800 which I would like to stretch to work full screen on a 1920x1200 monitor.

我读过这篇文章:的http://博客.adobe / aharui / 2008/01 / flex_and_scalemodes.html 并尝试过,但它只是放大的左上角(如文中提到的)。

I've read this article: blogs.adobe/aharui/2008/01/flex_and_scalemodes.html and tried it, but it only zooms the upper left corner (as mentioned in the article).

我用的WindowedApplication(如下所示),其保持视图(称为马西德威),它包含所有不同布局设计元件工作。

I work with a WindowedApplication (shown below) which holds a View (called MasterView) that contains all different lay-out elements.

有什么建议?

我的(简述)应用程序是这样的:

My application (in brief) looks like this:

<mx:WindowedApplication xmlns:mx="www.adobe/2006/mxml" layout="absolute" width="100%" height="100%" horizontalScrollPolicy="off" verticalScrollPolicy="off" clipContent="false" windowComplete="goFullscreen()" > private function goFullscreen():void { Mouse.hide(); this.stage.scaleMode = StageScaleMode.EXACT_FIT; this.stage.align = StageAlign.TOP_LEFT; this.stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE; try { showStatusBar = false; removeChild(statusBar); } catch (err:Error) { } root.stage.addEventListener(KeyboardEvent.KEY_DOWN, switchFullScreen) } </mx:WindowedApplication>

谢谢, 加布

Thanks, Gab

推荐答案

最后,我们找到了最好的解决方法是手动设置缩放比例。因此,通过确定屏幕/视口的宽度,并找出如何,可扩展到我们的应用程序的大小,我们解决了这个问题。

Finally we found out the best solution is to manually set the scaling ratio. So by determining the width of the screen/viewport and finding out how that scales to the size of our application we resolved this issue.

更多推荐

如何适应Flex AIR应用程序以全屏幕?

本文发布于:2023-11-23 14:21:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1621754.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:应用程序   全屏幕   Flex   AIR

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!