# Rescale movieclip based on browser size

**URL:** <https://forum.kirupa.com/t/rescale-movieclip-based-on-browser-size/181689>\
**Category:** Uncategorized\
**Created:** [March 12, 2006, 12:16am UTC](https://forum.kirupa.com/t/rescale-movieclip-based-on-browser-size/181689 "2006-03-12T00:16:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![andykd81](https://avatars.discourse-cdn.com/v4/letter/a/46a35a/32.png) [@andykd81](https://forum.kirupa.com/u/andykd81)\
**Post date:** [March 12, 2006, 12:16am UTC](https://forum.kirupa.com/t/rescale-movieclip-based-on-browser-size/181689/1 "2006-03-12T00:16:29Z")

</div>

hi

im trying to resize/scale a movieclip based on the browser window.  
i sort of got it working. but my prob is that i dont want it to scale beyond the browser size when u just stretch the width or height.check it out

[http://www.numero97.com/loader.html](http://www.numero97.com/loader.html)

if u stretch just the width of the browser the image enlarges which i dont wont it to. hope i am making some sense.

heres the code/formula used in a onResize

var mywidth:Number = 955;  
var myheight:Number = 575;

Enlarge = (Math.round(Stage.height/myheight_100)+Math.round(Stage.width/mywidth_100))/2;

\_level0.container\_mc.main\_photo\_mc.\_xscale = Enlarge;  
\_level0.container\_mc.main\_photo\_mc.\_yscale = Enlarge;

can anyone help me on this. i think its just to with the formula used for Enlarge.

cheers

Andy
