Skip to main content
July 23, 2013
Question

Screen Resolution

  • July 23, 2013
  • 1 reply
  • 661 views

I am developing an android game. How can I set the screen resolution to fit the phone's resolution?

This topic has been closed for replies.

1 reply

July 23, 2013

Can you describe it more detail?I'm a little bit confused.

Inspiring
July 23, 2013

use this code to trace out the resolution of your display:

import flash.system.Capabilities;

getScreenNVersion();

function getScreenNVersion():void{

    trace("flash.system.Capabilities.screenResolutionX is : " + String(flash.system.Capabilities.screenResolutionX) + "\n" +

    "flash.system.Capabilities.screenResolutionY is : " + String(flash.system.Capabilities.screenResolutionY)

    );

}

then use this information to scale your stage accordingly.

How can I set the screen resolution to fit the phone's resolution?

You can`t without using "hacks", the stage resoultion can not dynamically be changed,