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?

On 11/10/05, Lehr, Theodore M. <[EMAIL PROTECTED]> wrote:
>
> 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 would be scaled down so it looks right (to scale) and an
> image that is 680x840 would too....
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to