# Move MC and scale

**URL:** <https://forum.kirupa.com/t/move-mc-and-scale/70243>\
**Category:** flash\
**Created:** [November 11, 2004, 9:05pm UTC](https://forum.kirupa.com/t/move-mc-and-scale/70243 "2004-11-11T21:05:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaslgv](https://avatars.discourse-cdn.com/v4/letter/j/c77e96/32.png) [@jaslgv](https://forum.kirupa.com/u/jaslgv)\
**Post date:** [November 11, 2004, 9:05pm UTC](https://forum.kirupa.com/t/move-mc-and-scale/70243/1 "2004-11-11T21:05:46Z")

</div>

Hi All: I have this code below that moves my MC to a x-y cord on a mouse click. That works great. However, now I need modify it a bit to SCALE with the move.

**OK, code on my MC:**

onClipEvent (load) {  
\_root.targetx = -600;  
\_root.targety = -10;  
speed = 3;  
\_root.onEnterFrame = function() {  
\_x += (\_root.targetx-\_x)/speed;  
\_y += (\_root.targety-\_y)/speed;  
};  
}  
onClipEvent (enterFrame) {  
if (\_y == targety && \_x == targetx) {  
delete this.onEnterFrame;  
}  
}

**And the code on my btn:**

on (release) {  
\_root.targetx = -950;  
\_root.targety = -222;  
}
