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:* [email protected]
[mailto:[EMAIL PROTECTED] *On Behalf Of *Jurgen Beck
*Sent:* Thursday, September 20, 2007 4:18 PM
*To:* [email protected]
*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