3 Replies Latest reply on May 15, 2009 1:03 AM by Srirangan

    How to get System Screen Resolution


      Hello All,

      I am developing a flex application in adobe flex3 . When I design components in flex builder Design area is set to "Fit to window". so application get displayed on my monitor(17") correctly, however when I try running same application from different computer or a laptop of 14" wide screen display is different as monitor screen is short I need to scroll down to view complete page. My question is how can I make sure that the application should look uniform across different platform/different browsers and different monitors (irrespective of monitor's dimensions).

      And how can get the system screen resolution at runtime?

      Thanks for all the help and support.

        • 1. Re: How to get System Screen Resolution
          Flex harUI Adobe Employee

          Look in flash.system.capabilities.  Note that any browser-based app usually doesn't have control over how big to be.


          Alex Harui

          Flex SDK Developer

          Adobe Systems Inc.

          Blog: http://blogs.adobe.com/aharui

          • 2. Re: How to get System Screen Resolution
            Barna Biro Level 3

            Hi there,


            You could only assure that the application looks the same on any resolution if you make your site at the lowest resolution possible. That way, you are assured that no one will ever see it differently. Obviously, this is not a cool thing to do and I'm quite sure that, that's not what you want. Still, you can get quite good results if your site is full browser ( meaning that the .swf file is streched 100% of the browser with and 100% of the browser height ).


            A few examples:





            As you will see, the website content will adapt to the browser width and height ( even if you resize the window ); but to assure that the web site does not look bad if the user resolution is extremely small, I decided to limit it's minWidth and minHeight ( so if the user's resolution goes under the "minimum recommended" I add a scrollbar and stop the .swf file from scrolling ).


            That's the most you can do if you want to keep the site "good looking" in almost every situation.


            With best regards,

            Barna Biro

            Blog: http://blog.wisebisoft.com

            1 person found this helpful
            • 3. Re: How to get System Screen Resolution

              Hi Swati,


              Using Flex for application development places you at a very comfortable position with regard to uniformity across various platforms. I would suggest always assigning widths and heights in percentages via MXML. That would ensure cross platform uniformity.


              - Sri