# Scaling movie clip with buttons problem

**URL:** <https://forum.kirupa.com/t/scaling-movie-clip-with-buttons-problem/46410>\
**Category:** Uncategorized\
**Created:** [March 24, 2004, 10:40am UTC](https://forum.kirupa.com/t/scaling-movie-clip-with-buttons-problem/46410 "2004-03-24T10:40:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lukemack](https://avatars.discourse-cdn.com/v4/letter/l/e5b9ba/32.png) [@lukemack](https://forum.kirupa.com/u/lukemack)\
**Post date:** [March 24, 2004, 10:40am UTC](https://forum.kirupa.com/t/scaling-movie-clip-with-buttons-problem/46410/1 "2004-03-24T10:40:46Z")

</div>

hi,

i am using the following code to zoom in and out on a movie clip. i do not want the clip to become less than 90% in size. the buttons work but it is possible to break the functionality as the clip size can get below 90 and the button becomes disabled. can i fix this with a loop?

any ideas much appreciated:

in\_btn.onRelease = function (){  
\_root.inthemix.\_xscale\*=1.25;  
\_root.inthemix.\_yscale\*=1.25;  
trace(inthemix.\_xscale);

out\_btn.onRelease = function (){  
\_root.inthemix.\_xscale\*=0.75;  
\_root.inthemix.\_yscale\*=0.75;

if(inthemix.\_xscale \< 90.000000000000) out\_btn.enabled =false;  
else if(inthemix.\_xscale \>= 10000.0000000000000000) out\_btn.enabled=true;  
trace(inthemix.\_xscale);  
}  
};

thanks,

luke.

see it at [www.lukem.co.uk](http://www.lukem.co.uk) (click on designs)
