2 Replies Latest reply on Feb 11, 2009 6:07 AM by jeffreypritchard

    Scaling Flash (CS3) Flex Components

    jeffreypritchard
      Hi,

      Is there a straight-forward way to scale Flex Components created in Flash CS3 dynamically, while maintaining the aspect ratio of the component? I'm trying to account for resizing of the application window (AIR) or browser window, while maintaining the general appearance of the UI (kind of how a flash projector 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 out all the new height and width parameters on each component?).

      Any help is appreciated. Thanks very much.



        • 1. Re: Scaling Flash (CS3) Flex Components
          Level 7

          "jkpritchard" <webforumsuser@macromedia.com> wrote in message
          news:gmsi5e$icm$1@forums.macromedia.com...
          > Hi,
          >
          > Is there a straight-forward way to scale Flex Components created in Flash
          > CS3
          > dynamically, while maintaining the aspect ratio of the component? I'm
          > trying to
          > account for resizing of the application window (AIR) or browser window,
          > while
          > maintaining the general appearance of the UI (kind of how a flash
          > projector
          > 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
          > out
          > all the new height and width parameters on each component?).
          >
          > Any help is appreciated. Thanks very much.

          http://www.adobe.com/devnet/flash/articles/flex_component_workflow_04.html

          Near the bottom of the page.


          • 2. Re: Scaling Flash (CS3) Flex Components
            jeffreypritchard Level 1
            Hi Amy,

            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.