3 Replies Latest reply on Aug 21, 2011 6:00 PM by saisri2k2

    Application Scaling Issue

    Flex Rock Level 1

      Hi all,

                Application is getting scaled based on the width and height of div file. But components are not getting scaled. It was working in flex3. When i moved the project from Flex3 to Flex4 with same mxml code it is not working. Please anybody help me. I was struck with this for past two days.

       

      Regards,

      Jayagopal.

        • 1. Re: Application Scaling Issue
          saisri2k2 Level 4

          It might happen if you have explicit height and width on the components.

          • 2. Re: Application Scaling Issue
            Flex Rock Level 1

            You are exactly right saisri. But if i want to change the width and height to percentage i need to revamp the whole project. Is there any other way to solve it.

             

            Thanks,

            Jayagopal.

            • 3. Re: Application Scaling Issue
              saisri2k2 Level 4

              I would try my hands on the applications scaleX and scaleY, I guess you already know the applciations standard height and width, if the app's height and width is more than the standard height/width calculate the scaling factor from the formula NewHeight/standardHeight = scaling factor(all this calculations has to be done in the JS), do this for width also.

              Next use java script external interfaces to call a method in flex passing down the scaleX and scaleY values to it which does this.scaleX = new value and same for scaleY.

               

              2nd option: group has resizeMode='scale' property, if the browser size increases(i.e. app height increases/decreses) then the content in the app scales. I would wrap the whole application in this tag and tweak.