7

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

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
markblue777
  • 829
  • 3
  • 13
  • 28

4 Answers4

14

These will return the numbers to your output window:

trace(Capabilities.screenResolutionX);
trace(Capabilities.screenResolutionY);
the Tin Man
  • 158,662
  • 42
  • 215
  • 303
rejo
  • 3,352
  • 5
  • 27
  • 34
9

have a look at stage.fullScreenHeight and stage.fullScreenWidth

OXMO456
  • 3,558
  • 2
  • 25
  • 35
2

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.

bgw
  • 2,036
  • 1
  • 19
  • 28
1

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

the Tin Man
  • 158,662
  • 42
  • 215
  • 303
aaa
  • 11
  • 1