You can get the screen resolution from the Capabilities object - see here http://www.thedesilva.com/2008/06/finding-client-machine-capabilities-using-flex-flash/. >From that you can work out the middle of the screen.
However, a word of warning - I have no idea how Flash and/or different operating systems handle multiple displays. On Windows, all screen location points (x, y) are relative to the 'primary' screen. So the location point on any screen left or below of the primary screen will have negative values for example. There is not enough information provided for you to be able to handle these situations, which are becoming increasingly common. If you're looking just to place your app in the middle of the screen, I'd argue the effort isn't worth the effect. 2009/3/12 bartman279 <bartman...@yahoo.com>: > Of the screen? No, at least not any way that I am aware. > > You can determine the center of your flex application: > > private function findCenter() : void > { > var centerX:int = Application.application.width/2; > var centerY:int = Application.application.height/2; > Alert.show( String( centerX ) + " x " + String( centerY ) > ); > } > > Hope this helps! > > ~ Bart > > --- In flexcoders@yahoogroups.com, "timgerr" <tgallag...@...> wrote: >> >> I have to use layout="absolute" in my flex app, is there a way to find the x >> and y values of the middle of the screen? >> >> Thanks, >> timgerr >> > > > > ------------------------------------ > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Alternative FAQ location: > https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links > > > >