This content has been marked as final. Show 2 replies
"jkpritchard" <email@example.com> wrote in message
> Is there a straight-forward way to scale Flex Components created in Flash
> dynamically, while maintaining the aspect ratio of the component? I'm
> trying to
> account for resizing of the application window (AIR) or browser window,
> maintaining the general appearance of the UI (kind of how a flash
> will scale itself uniformly with the proper scale mode setting).
> I know scaleX and scaleY do not work, but is there workaround for this
> type of
> scaling (rather than adding listeners to the stage resizing and figuring
> all the new height and width parameters on each component?).
> Any help is appreciated. Thanks very much.
Near the bottom of the page.
I can set the height and width of my component explicitly, using the width and height attributes of the mxml, and that works fine. Coming from a Flash background, I'm used to the scaling the 'parent' and have all the children scale on their own.
What I am actually looking for is a way to have a flex component created in flash scale itself dynamically with it's parent (whether it be an HBox, VBox, etc), while maintaining it's original aspect ratio (similar to the way that StageScaleMode.ShowAll works in flash projector file). I'll keep digging, and see what I can come up with.
Thank you for you reply.