Scaling an Image Proportionatly

Hey all.
I’m a little stuck on this here. I can I want to resize the width of an image proportionate to the images height.

I’m having a huge blonde moment right now as I can’t wrap my head around it…

Here’s what I have…


        private function imgCompleteListener(e:Event):void {
            loader.content.x = loaderBg.x;
            loader.content.y = loaderBg.y;
            if (loader.content.height > loaderBg.height){
                loader.content.height = loaderBg.height;
                // Here's where the width should go
            }
        }

Thanks in advance…