AIR Screen Capture. Not So Fast.

AIR has all the makings to support the perfect lightweight, cross-platform screen capture application. After all, as the screencast immediately below shows, you can copy all the pixels on the display list that you want and save them to the file system or upload them to the interweb node of your liking.


Of course the real meat of a screen capture application extends beyond its own chrome and onto the desktop. You need to be able to access the screen and AIR doesn’t just doesn’t seem to have that capability. However, if you’ve watched any of Lee Brimelow’s presentations where he demos transparent AIR applications you just might think its possible to hack your way around AIR’s limitations and get to the desktop. I mean its simple, right? Just create a transparent window and grab some pixels from within that transparent frame. You can see the desktop. It’s composited into the AIR app’s display list, isn’t it? Unfortunately, as seen below that just doesn’t work. Attempts to copy desktop pixels through a transparent window results in nothing but big, fluffy, white pixels.


It sucks, but that’s the way it is. I’m just hoping that in version 2 we’ll see real desktop screen access and while we’re at it a method for selecting OS windows, window metadata and, if the window contains a browser, access to the DOM. ;-)



6 Responses to “ “AIR Screen Capture. Not So Fast.”

  1. One Idea I had was to try to use the print screen button and take the contents from the clipboard which would be a .bmp file but since flash does not have native .bmp support some one would have to convent the clipboard data into a byteArray then rencode the binarray data in to a jpg or png then take that byteArray and use writebites in to a Loader class. Thats one way but it would require the use of PrintScreen button

  2. Matthew Fabb says:

    I think back during the AIR Tour, that someone from Adobe said that type of functionality was left out for security reasons. Basically, they didn’t want people to creating an application that took a screenshot of a user’s desktop and then proceeds to steal user names and passwords via fake applications or even through a fake web browser. Not I’m not 100% sure of this, as the AIR tour was quite some time ago, perhaps it was just another developer I was talking to speculating why this functionality was missing, but I think it was someone from Adobe answering this question.

  3. it’s totally a security issue–but I still hate it when they fall back on that as the reason. I mean, if that’s the ONLY reason then okay. But maybe come up with a solution–like ask users or something.

    Ideally what we need is a way to send commands to other applications–then we could just use the SnagIt open API to have it do the work… wait a second.

  4. Susrut316 says:

    Ya Jester is right…I have created a screen capture app using Merapi it worked wonderfully…you can check it here http://www.youtube.com/watch?v=Gp2BzQi-gSU

  5. Anees says:

    Can you send me this example sample code

Leave a Reply