![](/img/trans.png)
[英]How to authenticate desktop FLEX/AIR app with a remote server (CAKEPHP)?
[英]How to set resolution higher on Flex desktop native (Air) app?
我正在嘗試更改在視網膜macbook上運行的flex原生應用(空氣)應用的分辨率。 瀏覽器中的Flex應用程序會自動以160dpi平滑渲染所有內容,但如果我構建與Air安裝應用程序相同的應用程序,則渲染為72dpi並且看起來不太好。 我知道您可以在移動應用程序的應用程序描述符文件中設置分辨率,但這不是一個。 另外,我已經嘗試在WindowedApplication標簽上設置applicationDPI屬性,但沒有運氣。 有任何想法嗎? 謝謝...
為了記錄,要在例如Retina Macbook Pros上運行的AIR桌面應用程序中啟用高分辨率渲染, <requestedDisplayResolution>high</requestedDisplayResolution>
在應用程序描述符XML的<initialWindow>
部分中設置<requestedDisplayResolution>high</requestedDisplayResolution>
。 需要Adobe AIR 3.6或更高版本。
<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 * newScale;}
根據用戶的分辨率縮放應用程序。 這是代碼:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.