Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to detect screen resolution in flex 4?

I want to make an application with an image that only bounces to the users screen resolution. How can I go by detecting the users screen resolution in flex 4? (If you can that is.)

like image 902
Dennis Avatar asked Dec 28 '22 00:12

Dennis


1 Answers

From http://www.sapethemape.com/2009/01/detecting-screen-resolution-in-flexair/, it looks like you can use Capabilities.screenResolutionX and Capabilities.screenResolutionY.

Example:

private function CapabilitiesMax():void
{
    width = Capabilities.screenResolutionX;
    height = Capabilities.screenResolutionY;
    stage.nativeWindow.x = 0;
    stage.nativeWindow.y = 0;
}
like image 138
Jason Towne Avatar answered Dec 31 '22 13:12

Jason Towne