Question

Is there a way ActionScript 3 can detect the user's screen resolution?

Was it helpful?

Solution

have a look at stage.fullScreenHeight and stage.fullScreenWidth

OTHER TIPS

These will return the numbers to your output window:

trace(Capabilities.screenResolutionX);
trace(Capabilities.screenResolutionY);

If you are on AIR, you could use the flash.display.Screen class, which contains this info, plus a lot more, such as color-depth, and multi-screen support.

flash.system.Capabilities.screenResolutionY and flash.system.Capabilities.screenResolutionX

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top