0 Replies Latest reply on Jan 12, 2010 3:56 PM by jsd99

    Automatically zoom and crop an image to fit in a square

    jsd99 Level 3

      I've got an mx:Image which is loading an image from the web.  I don't know how big the image will be in advance.  I'd like the loaded image to fit within the mx:Image's square frame by zooming and cropping off the sides or top/bottom as needed.  In other words, if the image frame is 64x64 and the loaded image is 70x64, it will be centered and lose a few pixels on the right and left sides.  Is it possible to do automatically?  I've played with maintainAspectRatio and scaleContent but I haven't been able to get what I want.