[Flashcoders] Logic Help

2005-11-11 Thread Lehr, Theodore M.
I have a mc that is 357x394 that I am loading various images into... these images are of various sizes but all are larger than the mc they are being loaded into... I need to scale them down proportionally so the whole image can be seen... how should I go about this so an image that is 840x680

RE: [Flashcoders] Logic Help

2005-11-11 Thread Chris Wilson
10, 2005 7:58 AM To: Flashcoders mailing list Subject: [Flashcoders] Logic Help I have a mc that is 357x394 that I am loading various images into... these images are of various sizes but all are larger than the mc they are being loaded into... I need to scale them down proportionally so the whole

Re: [Flashcoders] Logic Help

2005-11-11 Thread eric dolecki
private function proportionalScale( who:MovieClip, mcHolder:MovieClip, nDesiredWidth:Number, nDesiredHeight:Number ):Void { var scaleBy:Number = Math.min(nDesiredWidth / who.width, nDesiredHeight /who.height); mcHolder._xscale = scaleBy; mcHolder._yscale = scaleBy; } Maybe something like that?