(Beta)
Package | flash.display |
Class | public class ScreenMode |
Inheritance | ScreenMode Object |
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 31.0 |
Methods and properties of the following classes use ScreenMode objects:
- ScreenMode
Related API Elements
Public Properties
Property | Defined By | ||
---|---|---|---|
colorDepth : int [read-only]
The color depth of the ScreenMode in number of bits. | ScreenMode | ||
constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | ||
height : int [read-only]
The screen height of the ScreenMode in pixels. | ScreenMode | ||
refreshRate : int [read-only]
The screen refresh rate of the ScreenMode in hertz. | ScreenMode | ||
width : int [read-only]
The screen width of the ScreenMode in pixels. | ScreenMode |
Public Methods
Property Detail
colorDepth | property |
height | property |
refreshRate | property |
refreshRate:int
[read-only] Language Version: | ActionScript 3.0 |
Runtime Versions: | 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 | property |
Examples How to use this example
Screen.mode.2.as
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 ;
Wed Nov 21 2018, 06:34 AM -08:00