# \[Flash8\] Scaling a moviclip from 100%-70%-100% using the x-axis

**URL:** <https://forum.kirupa.com/t/flash8-scaling-a-moviclip-from-100-70-100-using-the-x-axis/236663>\
**Category:** flash\
**Created:** [August 22, 2007, 5:08pm UTC](https://forum.kirupa.com/t/flash8-scaling-a-moviclip-from-100-70-100-using-the-x-axis/236663 "2007-08-22T17:08:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mcguyver82](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@mcguyver82](https://forum.kirupa.com/u/mcguyver82)\
**Post date:** [August 22, 2007, 5:08pm UTC](https://forum.kirupa.com/t/flash8-scaling-a-moviclip-from-100-70-100-using-the-x-axis/236663/1 "2007-08-22T17:08:17Z")

</div>

I am building a flash piece in which I need an object to move across the stage from right to left and scale from 100% just off the right side of the stage, to 70% in the middle of the stage and then 100% again just off the left side of the stage. Giving the illusion that it is moving in a circular pattern around the viewer. My goal is to get the scaling to be relative to the MC’s x position on the stage. Moving it across the stage is the easy part, and I can scale the MC from 100% on the right to 0% on the left using an onEnterFrame function containing:

MC.\_xscale = MC.\_yscale = Math.round((MC.\_x/Stage.width)\*100);

but I can’t seem to figure the 100-70-100 deal out. I thought there might be a math function like sin, cos or tan that would really help out, but I can’t seem to find anything out there. Any Ideas?
