Proportional Image Resizing

Hi All,

I’m relatively new to AS3.0 and Flash in general but I have made enough progress to establish a site with an xml image gallery.

I would like each image in the xml gallery to be sized depending upon the stage dimensions so that each user, depending on the screen resolution / window resolution of their browser, will see the image at the best resolution.

I think that the design of my website would support the images being displayed with the longest dimension (whether that be the height or width of the image) at a factor of 0.9 of the stage width or height (depending whether the image is portrait or landscape).

If we assume that each image in the gallery is termed imgArray[p] do I need an if / else statement to control how to display the image proportionally on the stage at a 0.9 factor?

Not sure if I’m making myself clear but I’d appreciate any input.

Many thanks/