Install ApplicationDPI in AS3 Mobile App

I am developing an application in Flash Builder only with AS3 (without using flex). In flex, you can configure dpi applications with the following code:

<s:ViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009" 
   xmlns:s="library://ns.adobe.com/flex/spark" applicationDPI="320">

But I use only AS3. I read that it is not possible to change the DPI of an application at runtime (with AS3), but how can I set this in project settings, compiler settings, or is there any other way to do this?

Also, what is the default application DPI setting?

Ask about it here because you cannot find it on the net (only based on flexible solutions).

+3
source share
1 answer

DPI , . applicationDPI Flex, , Flex .

. DPI , applicationDPI . , , DPI. , DPI DPI, Flex , . , 160 DPI, 1,5x 240 DPI. , , .

AS3 .

DPI Capabilities.screenDPI, , , , - . - .

 private static const WIDTH:Number = 1024;

,

 var ratio:Number = stage.fullScreenWidth / WIDTH;

myBitmap.scaleX = myBitmap.scaleY = ratio;

, fullScreenWidth/Height . , -

if (stage.fullScreenWidth > stage.fullScreenHeight){
  //portrait 
} else {
  //landscape
}

,

+3

All Articles