Detecting the number of screens on a users system in Adobe AIR
The following example shows how you can detect the number of screens on a user’s system in Adobe AIR by using the static, read-only Screen.screens
property.
From the documentation:
colorDepth
- The color depth of this screen (expressed in number of bits).visibleBounds
- ThevisibleBounds
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.
<?xml version="1.0" encoding="utf-8"?> <!-- http://airexamples.com/2010/03/15/detecting-the-number-of-screens-on-a-users-system-in-adobe-air/ --> <mx:WindowedApplication name="Screen_screens_test" xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white" initialize="init();"> <mx:Script> <![CDATA[ private function init():void { var tmp:Screen; txt.htmlText = "<b>You have " + Screen.screens.length + " screens:</b>\n"; for each (tmp in Screen.screens) { txt.htmlText += "<li>width:" + tmp.visibleBounds.width + ", height:" + tmp.visibleBounds.height + ", colorDepth:" + tmp.colorDepth + "</li>"; } } ]]> </mx:Script> <mx:Text id="txt" width="300" /> </mx:WindowedApplication>
- Share this:
2 Responses to Detecting the number of screens on a users system in Adobe AIR
Leave a Reply Cancel reply
- http://get.adobe.com/air/
- Platform ActionScript Language Reference
Recent Posts
- Detecting the number of screens on a users system in Adobe AIR
- Opening a new NativeWindow in Adobe AIR
- Detecting the line-ending character sequence used by the host operating system in Adobe AIR
- Displaying a custom title bar icon in a WindowedApplication container in Adobe AIR
- Setting a custom text style on the status bar on a WindowedApplication container in Adobe AIR
- Keeping a WindowedApplication on top of other windows in Adobe AIR
- Specifying whether a new Window is focused in Adobe AIR
- Opening a new Window in Adobe AIR
- Setting the file size display mode in the Flex FileSystemDataGrid control in Adobe AIR
- Sorting the FileSystemDataGrid control by date in Adobe AIR
Archives
- March 2010 (10)
- February 2009 (3)
- January 2009 (6)
- December 2008 (44)
How do I know if adobe is installed and working properly?
sorry, but there is no way from flash/air to check if flash/air is correctly installed. Basicly, make a “hello world” app and run it to test or download a tested and working app from the adobe download section to test it out.