5 Replies Latest reply on Oct 15, 2008 12:42 PM by Newsgroup_User

    Stretch/Zoom instead of resize/realign?

    OneNerd
      Wanted to know if (and how) to set up a flex application to not resize, but instead zoom/stretch (or however you explain it).

      For example, if I have a flash video that is 400 x 300, and I resize the browser, the video zooms/stretches to fit the browser. In a flex app, it resizes, but its not stretching/zooming, it is actually re-positioning the components (and they all stay the same size).

      Is it possible to make the flex app stretch/zoom insted? If so, how?

      Thanks -
        • 1. Re: Stretch/Zoom instead of resize/realign?
          Level 7

          "OneNerd" <webforumsuser@macromedia.com> wrote in message
          news:gd5bb2$jvq$1@forums.macromedia.com...
          > Wanted to know if (and how) to set up a flex application to not resize,
          > but
          > instead zoom/stretch (or however you explain it).
          >
          > For example, if I have a flash video that is 400 x 300, and I resize the
          > browser, the video zooms/stretches to fit the browser. In a flex app, it
          > resizes, but its not stretching/zooming, it is actually re-positioning the
          > components (and they all stay the same size).
          >
          > Is it possible to make the flex app stretch/zoom insted? If so, how?

          Use a percentage based size on the thing you want to stretch/zoom.

          HTH;

          Amy


          • 2. Re: Stretch/Zoom instead of resize/realign?
            OneNerd Level 1
            Thanks Amy. However, I have a sophisticated series of layouts etc -- what I really wanted to do is set the entire flex app.

            For example if I do this:
            <mx:Application
            xmlns:mx=" http://www.adobe.com/2006/mxml"
            layout="absolute"
            width="100%" height="100%"

            everything in the app re-aligns/etc. Do I need to go back in and set every object to an absolute position, take away the snap-to-left/snap-to-right sort of things, and set every singe object to a %?

            Thanks!
            • 3. Re: Stretch/Zoom instead of resize/realign?
              Level 7

              "OneNerd" <webforumsuser@macromedia.com> wrote in message
              news:gd5dic$msb$1@forums.macromedia.com...
              > Thanks Amy. However, I have a sophisticated series of layouts etc -- what
              > I
              > really wanted to do is set the entire flex app.
              >
              > For example if I do this:
              > <mx:Application
              > xmlns:mx=" http://www.adobe.com/2006/mxml"
              > layout="absolute"
              > width="100%" height="100%"
              >
              > everything in the app re-aligns/etc. Do I need to go back in and set every
              > object to an absolute position, take away the snap-to-left/snap-to-right
              > sort
              > of things, and set every singe object to a %?

              There's no quick answer to that, without knowing what you've done.


              • 4. Re: Stretch/Zoom instead of resize/realign?
                OneNerd Level 1
                I have been tinkering, and it appears that I can't even do the % thing on a control object. For example, if I do it on a text label, the label resizes, but the text itself (the font size of it) does not - i suppose because it would need to be a bitmap first?

                Perhaps flex just does not do this the way I want?
                • 5. Re: Stretch/Zoom instead of resize/realign?
                  Level 7

                  "OneNerd" <webforumsuser@macromedia.com> wrote in message
                  news:gd5eq8$ocl$1@forums.macromedia.com...
                  >I have been tinkering, and it appears that I can't even do the % thing on a
                  > control object. For example, if I do it on a text label, the label
                  > resizes, but
                  > the text itself (the font size of it) does not - i suppose because it
                  > would
                  > need to be a bitmap first?
                  >
                  > Perhaps flex just does not do this the way I want?

                  You'd have to implement something custom to either change the fontSize based
                  on available space or change the scaleX, scaleY with the blendMode set to
                  layer.