# Help on mc scrolling with easing

**URL:** https://forum.kirupa.com/t/help-on-mc-scrolling-with-easing/39837
**Category:** Uncategorized
**Created:** [January 12, 2004, 1:31am UTC](https://forum.kirupa.com/t/help-on-mc-scrolling-with-easing/39837 "2004-01-12T01:31:25Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![netrix](https://avatars.discourse-cdn.com/v4/letter/n/f0a364/32.png) [@netrix](https://forum.kirupa.com/u/netrix)
#### Post date: [January 12, 2004, 1:31am UTC](https://forum.kirupa.com/t/help-on-mc-scrolling-with-easing/39837/1 "2004-01-12T01:31:25Z")

</div>

Hello everyone… well I can’t figure out was wrong with this, first of all my knowledge of as is very limited so any help will be very much appreciated. My problem is that I can’t make the mc to stop at a certain x coordinate, I want it to scroll until it reaches that coordinate then stop but I can’t do it!! here is the as I am using on the mc:

[SIZE=1]ActionScript:[/SIZE]

* * *

onClipEvent(load){  
\_root.tarX = -300  
mgall.\_y = 100  
}  
onClipEvent(enterFrame){  
\_x = \_root.tarX-(\_root.tarX-\_x)/1.2  
}

* * *

And on the button:

[SIZE=1]ActionScript:[/SIZE]

* * *

on (rollOver) {  
if (\_root.tarX\>=60) {  
delete this.onEnterFrame;  
} else {  
var speed = 100;  
\_root.tarX += speed;  
}  
}  
on (press) {  
if (\_root.tarX\>=60) {  
delete this.onEnterFrame;  
} else {  
\_root.tarX += 175;  
}  
}

* * *

also I post a fla with an example of what I am trying to do, any help will be very much appreciated… 🔗
