Language version: | ActionScript 3.0 |
Runtime version: | AIR 31.0
|
The ScreenMode object provides information about the width, height and refresh rate of a Screen.
Methods and properties of the following classes use ScreenMode objects:
View the examples.
colorDepth:int
[read-only]
Language version: | ActionScript 3.0 |
Runtime version: | AIR 31.0
|
The color depth of the ScreenMode in number of bits.
The color depth
property indicates the color depth of the ScreenMode.
Implementation
public function get colorDepth():int
height:int
[read-only]
Language version: | ActionScript 3.0 |
Runtime version: | AIR 31.0
|
The screen height of the ScreenMode in pixels.
The height
property indicates the height of the ScreenMode.
Implementation
public function get height():int
refreshRate:int
[read-only]
Language version: | ActionScript 3.0 |
Runtime version: | AIR 31.0
|
The screen refresh rate of the ScreenMode in hertz.
The refreshRate
property indicates the refresh rate of the ScreenMode.
The return value is 0 when a display device does not support refresh rate.
Implementation
public function get refreshRate():int
width:int
[read-only]
Language version: | ActionScript 3.0 |
Runtime version: | AIR 31.0
|
The screen width of the ScreenMode in pixels.
The width
property indicates the width of the ScreenMode.
Implementation
public function get width():int
The following example shows how to use the properties of the ScreenMode
(in this case, the primary display screen):
import flash.display.ScreenMode;
import flash.display.Screen;
var primarymonitor:Screen = Screen.mainScreen;
stage.displayState=StageDisplayState.FULL_SCREEN_INTERACTIVE;
var r:ScreenMode = primarymonitor.mode;
res_0.text = r.width + "*" + r.height + "*" + r.refreshRate +"*" + r.colorDepth ;
© 2004-2022 Adobe Systems Incorporated. All rights reserved.
Wed Sep 28 2022, 6:12 PM GMT+01:00