# Proposional scale?

**URL:** <https://forum.kirupa.com/t/proposional-scale/259311>\
**Category:** Uncategorized\
**Created:** [May 3, 2008, 8:55am UTC](https://forum.kirupa.com/t/proposional-scale/259311 "2008-05-03T08:55:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Macsy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/macsy/32/3238_2.png) [@Macsy](https://forum.kirupa.com/u/Macsy)\
**Post date:** [May 3, 2008, 8:55am UTC](https://forum.kirupa.com/t/proposional-scale/259311/1 "2008-05-03T08:55:47Z")

</div>

hello.  
i made something very much more diffucult then it have to be, and i wonder how i would do it more easy,

I get tons of IMGs thru a php file and then load them with movieClipLoader.  
To get them all to fit into a 100x100 px small thumbnailholder i need to scale them down,  
i do this right now with this stupid code:  
targetMC is the loaded Img,  
contSize = 100  
[AS]  
if (targetMC.\_height \> targetMC.\_width)  
{  
difference = targetMC.\_width / targetMC.\_height;  
targetMC.\_height = contSize;  
targetMC.\_width = contSize \* difference;  
}  
else if (targetMC.\_height \< targetMC.\_width)  
{  
difference = targetMC.\_height / targetMC.\_width;  
targetMC.\_width = contSize;  
targetMC.\_height = contSize \* difference;  
}  
else if (targetMC.\_height == targetMC.\_width)  
{  
targetMC.\_width = contSize;  
targetMC.\_height = contSize;  
}  
[/AS]

how should i do this using xscale or something ?  
Thanks
