5

我正在尝试更改在视网膜 macbook 上运行的 flex 本机应用程序(空气)应用程序的分辨率。浏览器中的 Flex 应用程序会自动以 160dpi 流畅地渲染所有内容,但如果我构建与 Air 安装应用程序相同的应用程序,它会以 72dpi 渲染,看起来不太好。我知道您可以在应用程序描述符文件中为移动应用程序设置分辨率,但这不是一个。另外,我也尝试在 WindowedApplication 标签上设置 applicationDPI 属性,但没有成功。有任何想法吗?谢谢...

4

2 回答 2

2

作为记录,要在运行在 Retina Macbook Pro 上的 AIR 桌面应用程序中启用高分辨率渲染,请在应用程序描述符 XML<requestedDisplayResolution>high</requestedDisplayResolution><initialWindow>部分中进行设置。需要 Adob​​e AIR 3.6 或更高版本。

http://help.adobe.com/en_US/air/build/WSfffb011ac560372f2fea1812938a6e463-8000.html#WSfffb011ac560372f-4cb7055d12d779150e8-8000

于 2014-03-02T11:07:01.790 回答
0

http://gregsramblings.com/2010/05/06/scaling-an-adobe-air-application-to-fit-multiple-resolutions-and-netbooks/

<mx:WindowedApplication xmlns:mx=" http://www.adobe.com/2006/mxml " ; width="1019" height="680" scaleX="0.8" scaleY="0.8" applicationComplete="init()" ...>

<mx:WindowedApplication xmlns:mx=" http://www.adobe.com/2006/mxml " ; width="1019" height="680" preinitialize="initScreenSize()" applicationComplete="init()" ... > ... ... 私有函数 initScreenSize():void{ var thisScreen:Screen = Screen.mainScreen; var newScaleX:Number = thisScreen.visibleBounds.width / 1019 * 0.98; var newScaleY:Number = thisScreen.visibleBounds.height / 680 * 0.98; var newScale:Number = Math.min(newScaleX,newScaleY,1); this.scaleX = newScale; this.scaleY = newScale; this.height = this.height * newScale; this.width = this.width *新规模;}

根据用户的分辨率缩放应用程序。这是代码:

于 2013-05-10T10:36:47.007 回答