I'm trying to do a proportional resize of an image. I know the image's original dimensions (which vary from image to image) and then I know its intended height in pixels. How do I scale it down to fit the new height whilst keeping it in proportion? Is there a simple equation to do this?
once loading is complete (into an empty movieclip), you can access its original dimensions (so that need not be hard-coded). and when loading is complete, you can assign your resizing:
target.aspectRatio = target._width/target._height;
target._height = newHeight;
target._width = target.aspectRatio*target._height;
I was just about to write that as a response to my own question sometimes I look for a more complicated answer and forget junior school maths
many thanks kglad.