2 Replies Latest reply on Oct 5, 2008 6:24 PM by AcidGuy

    Flex Image Component Filled with image

    AcidGuy
      Hi guys, any of you knows a way to stretch a picture in a component "Image" without the proper scaling?, the thing is i did it before astro with certain code in php, so the user for example uploaded a picture and it got to the right size, but sometimes they had to wait to upload to the server to see the standard size preview.

      now with astro, nice thing you can load the image at runtime and just preview it "how is going to be" before uploading the image to the server....

      this is the closest thing have gotten, but still the image cant get to a certain size, that will be Heigth : "300", width : "400", when loaded directly with image component, it just kept scaling, so certain areas of the image component ketp empty..... it doesnt matter if it distorts....

      i am porting my project from php to flex...
      have learned many things about flex, great language, but cant get this working properly.

      probably is a simple thing for some of you guys, help!.

      here is the code is currently in....
        • 1. Re: Flex Image Component Filled with image
          slaingod Level 1
          You can use scaleContent="true" and maintainAspectRatio="false" so that you image stretches.
          • 2. Re: Flex Image Component Filled with image
            AcidGuy Level 1
            nice, slaingod... thx. fixed....
            now 1 posibility is opened to send the filereference to the image to the server... and the user to preview like going to be save on the server....

            but another possibility, would not be nice, the user for example that big image is compressed into flash(changing bitmapdata height, width) then be sent for example to php and not the "fileference" from the original file which cout be many mbs??

            anyone how to get handled width,height in bitmapdata, or...
            is possible to take the picture on the "Image" component and get it ready for sending it to server?

            thx, if this is resolved, theses steps could be great for a tutorial, thx again slaingod.