5 Replies Latest reply on Jul 2, 2008 12:51 PM by Ansury

    Screen types

    stinasius Level 1
      I am developing a flex application in adobe flex2 and coldfusion for back end processing. 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).
      Thanks for all the help and support.
        • 1. Re: Screen types
          Gregory Lafrance Level 6
          You can use the Capabilities class to get the screen resolution and base your app coordinates off that. See FB3 help.
          • 2. Re: Screen types
            stinasius Level 1
            hi sorry for being a pain, but is it possible to post an example of how its done with the capabilities class? thanks
            • 3. Re: Screen types
              Karl_Sigiscar_1971 Level 3

              Use constrained based layout:

              1- Specify layout="absolute" in the Application tag and also use Canvases.
              2- Use right, left, top, bottom properties to lay things out (as opposed to x and y) so your layout will adapt to the screen
              3- Use percentage width and height like 100% or 50% to define your display areas.

              This way, your application will adapt to any screen size.
              • 4. Re: Screen types
                Developer504 Level 1
                I ran into the same problem, and I've been using formulaes like this:

                x="{this.width * 0.49}"

                Is that an acceptable alternative?
                • 5. Re: Screen types
                  Ansury Level 3
                  Something easy to try (but you'd have to find some good scale values) would be to look at the swf's width/height within an init() event handler, and set the Application's scaleX and scaleY to some larger value.

                  Ex. if (width > 1200) {
                  scaleX = 1.2;
                  scaleY = 1.2;

                  I'm not sure if there would be visual side effects or performance issues (esp if you're showing video or something other than forms and datagrids), so make sure you explore that if you try this. There may be bad visual side effects if you try to scale smaller, or maybe just if it's too small, but slightly larger should work ok.