| window.runtime property | window.runtime.flash.display.Screen |
| Inheritance | Screen EventDispatcher |
| Runtime Versions: | 1.0 |
Screens are independent desktop areas within a possibly larger "virtual desktop." The origin of the virtual desktop is the top-left corner of the operating-system-designated main screen. Thus, the coordinates for the bounds of an individual display screen may be negative. There may also be areas of the virtual desktop that are not within any of the display screens.
The Screen class includes static class members for accessing the available screen objects and instance members for accessing the properties of an individual screen. Screen information should not be cached since it can be changed by a user at any time.
Note that there is not necessarily a one-to-one correspondance between screens and the physical monitors attached to a computer. For example, two monitors may display the same screen.
You cannot instantiate the Screen class directly. Calls to
the new Screen() constructor throw an
ArgumentError exception.
| Property | Defined By | ||
|---|---|---|---|
| bounds : Rectangle [read-only]
The bounds of this screen. | Screen | ||
| colorDepth : int [read-only]
The color depth of this screen (expressed in number of bits). | Screen | ||
| mainScreen : Screen [static] [read-only]
The primary display. | Screen | ||
| screens : Array [static] [read-only]
The array of the currently available screens. | Screen | ||
| visibleBounds : Rectangle [read-only]
The bounds of the area on this screen in which windows can be visible. | Screen | ||
| Method | Defined By | ||
|---|---|---|---|
![]() | addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener
receives notification of an event. | EventDispatcher | |
![]() |
Dispatches an event into the event flow. | EventDispatcher | |
[static]
Returns the (possibly empty) set of screens that intersect
the provided rectangle. | Screen | ||
![]() |
Checks whether the EventDispatcher object has any listeners registered for a specific type
of event. | EventDispatcher | |
![]() |
Removes a listener from the EventDispatcher object. | EventDispatcher | |
![]() |
Checks whether an event listener is registered with this EventDispatcher object or any of
its ancestors for the specified event type. | EventDispatcher | |
| bounds | property |
bounds:Rectangle [read-only] | Runtime Versions: | 1.0 |
The bounds of this screen.
The screen location is relative to the virtual desktop.
| colorDepth | property |
colorDepth:int [read-only] | Runtime Versions: | 1.0 |
The color depth of this screen (expressed in number of bits).
| mainScreen | property |
| screens | property |
screens:Array [read-only] | Runtime Versions: | 1.0 |
The array of the currently available screens.
Modifying the returned array has no effect on the available screens.
| visibleBounds | property |
visibleBounds:Rectangle [read-only] | Runtime Versions: | 1.0 |
The bounds of the area on this screen in which windows can be visible.
The visibleBounds of a screen excludes the task bar
(and other docked desk bars) on Windows, and excludes the
menu bar and, depending on system settings, the dock on Mac OS X.
On some Linux configurations, it is not possible to determine the visible bounds.
In these cases, the visibleBounds property returns the same
value as the screenBounds property.
| getScreensForRectangle | () | method |
function getScreensForRectangle(rect:Rectangle):Array| Runtime Versions: | 1.0 |
Returns the (possibly empty) set of screens that intersect the provided rectangle.
Parameters
rect:Rectangle — A rectangle with coordinates relative to the origin of
the virtual desktop, which is the top-left corner of the primary
screen.
|
Array — An array of Screen objects containing the screens that contain any
part of the area defined by the rect parameter.
|