The trick for scale mode is to fix the size of the application.  %
width/height will usually not work.  The entire visible portion of the
app must show up in that size for scale mode to work.

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Jurgen Beck
Sent: Friday, September 21, 2007 5:54 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Dynamic Scaling of a Flex Application

 

Thanks Alex and Yaagoub.

Both work well, with some minor issues to get around:

ScaleX and ScaleY:
We have to set some metrics and listen for the resize event to keep
things dynamic enough. Without setting starting metrics we don't really
know what we should scale to when we resize.

stage.scaleMode:
There seems to be some funky behavior as to the application container
itself. It's a bit difficult to get exact results. For example, setting
the width and height of a canvas to 100% will scale the canvas and all
containing children to the top left quarter of the canvas, depending on
the aspect ratio of the browser or standalone Flash Player. 

Other issues seem to have to do with how Flex calculates the scaled
ratios in relationship to the application container size.

Nothing that we can't address with a bit of R&D, but as I said, it's a
bit funky.

Again, thanks to both of you!

Jurgen

Yaagoub Al-Nujaidi wrote: 

        ScaleX and ScaleY properties of the application will scale the
whole application. You can set them at the creationComplete event of the
Application, or anytime dynamically.
        
        Alex Harui <[EMAIL PROTECTED]> wrote:

                stage.scaleMode

                
                
________________________________


                From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf Of Jurgen Beck
                Sent: Thursday, September 20, 2007 4:18 PM
                To: flexcoders@yahoogroups.com
                Subject: [flexcoders] Dynamic Scaling of a Flex
Application

                I am looking for a way to visually scale a Flex
application similar to 
                what is possible with a Flash SWF. For example, creating
a Flash SWF and 
                changing the size of the movie will scale all content,
including text 
                and other elements.
                
                Looking for the same with a Flex application, I haven't
been able to 
                locate a property or method that allows me to do that.
                
                Question: Is Flex able to dynamically size content
(including text) 
                based on a global setting, or are we constraint to
specifying the sizes 
                of elements manually?
                
                Hope this makes sense, if not, I'll explain a bit more.
                
                Thanks,
                
                Jurgen

         

 

Reply via email to