« AIR is Desktop 2.0 | Main | Mapping File Extensions to MIME Types »

December 3, 2007

Multi-monitor Support in AIR

I've seen several people ask about multi-monitor support in AIR. The answer is: it's there, and it's very good.

Take a look at the flash.display.Screen class (AIR only -- not available in the Flash Player). It contains the following properties:

The Screen class also contains a very cool function called getScreensForRectangle that returns an array of screens that intersect the specified Rectangle.

We've also added a ScreenMouseEvent that is dispatched by SystemTrayIcon and gives you the coordinates of a click relative to the main screen as opposed to an application window.

For a relatively simple example of the Screen APIs in action, check out SPF on the Adobe Labs Sample Application page.

Posted by cantrell at December 3, 2007 10:35 AM

Comments

Christian:

There is no sample app called "SPF" or any verbiage relating to multiple monitors on the labs link you provided. Help?

Mark

Posted by: Mark Mazelin at December 13, 2007 8:37 AM

The code is now available on Google Code here:

http://code.google.com/p/screenprotectionfactor/

Christian

Posted by: Christian Cantrell at December 18, 2007 7:35 AM

Any reason this isn't part of the Flash Player? Is there any possibility this will be part of Flash Player 10 ?

Posted by: arpit at January 18, 2008 5:28 PM

It's always possible that AIR APIs could find their way into the Flash Player, but I doubt the Screen APIs will be integrated anytime soon. They won't do much good since you can't do thinks like open new windows.

Christian

Posted by: Christian Cantrell at January 21, 2008 10:39 AM

I've looked in to this a while ago and build a ScreenManager to move and activate screens on one of the screens.
Take a look at this;
http://www.joristimmerman.be/wordpress/2009/03/03/screenmanager-expand-your-air-application/

Posted by: Joris Timmerman at March 21, 2009 3:38 PM




Remember Me?

(you may use HTML tags for style)

Copyright © 2009 Adobe Systems Incorporated. All rights reserved.
Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy (updated 07-14-2009).