To convert a point relative to any object on your Flex form you want to use the localToGlobal method. For example ..
var p:Point = new Point(10,-15); // define an offset
var object.localToGlobal(p); // converts the point object from the main Sprite coordinates (local) into the Stage coordinates (global).
Well, I am trying to think about your requirement for the resolution of the monitor. I am not sure why it is important to know monitor resolution vs application resolution.
I haven't done much AIR so can't answer that, but since the Flex form is contained in the browser, the size of the Application will not be the resolution of the monitor. My only guess as this point would be to write an ExternalInterface method in Flex that talks to the Browser, with the Browser perhaps returning it's size?
1 person found this helpful
In AIR, there should be enough info on NativeWindow. In Web, you might need
to see if there is JS that will return browser coordinates.
I want to take a screenshot of the AIR app, and then draw a border around a given component.
For this, I can obtain the global position of the component(x,y,width,height).
But when I draw the rectangle on the screenshot, the rectangle is offset by a y value equal to the titlebar height and an x value equal to the application border.
I need to add these (titlebar height to y position and app border width to x position) to draw the proper border.
So, my question is, how can I get the app border width and titlebar height of an AIR app.
I looked at the NativeWindow property while debugging, but there is no info on these...