How do I get the user's screen resolution in ActionScript 3?

前端 未结 4 1010
难免孤独
难免孤独 2021-02-09 04:12

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

相关标签:
4条回答
  • 2021-02-09 04:46

    have a look at stage.fullScreenHeight and stage.fullScreenWidth

    0 讨论(0)
  • 2021-02-09 04:48

    These will return the numbers to your output window:

    trace(Capabilities.screenResolutionX);
    trace(Capabilities.screenResolutionY);
    
    0 讨论(0)
  • 2021-02-09 05:01

    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.

    0 讨论(0)
  • 2021-02-09 05:08

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

    0 讨论(0)
提交回复
热议问题