How to detect the Monitor current resolution in flex.
如何在flex中检测Monitor当前分辨率。
2 个解决方案
#1
1
Try to use flash.system.Capabilities
class and its properties screenDPI
, screenResolutionX
and screenResolutionY
.
尝试使用flash.system.Capabilities类及其属性screenDPI,screenResolutionX和screenResolutionY。
#2
0
You can't just detect screen resolution in Flex. The closest thing you can do is switch to full screen mode and then check your stage resolution, which will then equal monitor resolution.
您不仅可以在Flex中检测屏幕分辨率。您可以做的最接近的事情是切换到全屏模式,然后检查您的舞台分辨率,这将等于显示器分辨率。
To switch to full screen set the stage's displayState
property to StageDisplayState.FULL_SCREEN
.
要切换到全屏,请将舞台的displayState属性设置为StageDisplayState.FULL_SCREEN。
#1
1
Try to use flash.system.Capabilities
class and its properties screenDPI
, screenResolutionX
and screenResolutionY
.
尝试使用flash.system.Capabilities类及其属性screenDPI,screenResolutionX和screenResolutionY。
#2
0
You can't just detect screen resolution in Flex. The closest thing you can do is switch to full screen mode and then check your stage resolution, which will then equal monitor resolution.
您不仅可以在Flex中检测屏幕分辨率。您可以做的最接近的事情是切换到全屏模式,然后检查您的舞台分辨率,这将等于显示器分辨率。
To switch to full screen set the stage's displayState
property to StageDisplayState.FULL_SCREEN
.
要切换到全屏,请将舞台的displayState属性设置为StageDisplayState.FULL_SCREEN。