To access pixels outside of the AIR app you can use the Native Process API (in AIR2.0) to take a screenshot and then grab the pixel info from the resulting image.
You could also adapt the code to just grab a single pixel.
Thanks for your response, but i need to get the screen pixeles from inside the Flex context and not using another application.
Do you have another idea maybe?
would like to know that too
Sorry for the misunderstanding - luckily its much easier to get the pixel colour from inside the app...
First take a snapshot of the entire app:
var bmd:BitmapData = new BitmapData(stage.stageWidth, stage.stageHeight);
Now you can get the colour of the pixel below the mouse pointer like this:
var colour:uint = bmd.getPixel(stage.mouseX, stage.mouseY);
The problem with this solutions that i can't get the background of the screen.
I work with transparent application, and when the mouse is on the transparent places, i don't get notifications in the Flex, Besides if i am working with two monitors i can get indication from the second screen.
If you are trying to grab a pixel from behind the app (rather than in the app itself) you will need to use my original solution as AIR doesnt have any way of directly grabbing the desktop.
Try changing the background of your app to a very low alpha (say 0.001) and you will get notifications (and background will still look transparent) - its only for 0 alpha that they dont work. Unfortunately, the colour you grab will be the app background and will not include the desktop colour behind it.