# Stop mc motion at a certain point?

**URL:** <https://forum.kirupa.com/t/stop-mc-motion-at-a-certain-point/177259>\
**Category:** Uncategorized\
**Created:** [January 31, 2006, 4:27pm UTC](https://forum.kirupa.com/t/stop-mc-motion-at-a-certain-point/177259 "2006-01-31T16:27:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![impedicus](https://avatars.discourse-cdn.com/v4/letter/i/5daacb/32.png) [@impedicus](https://forum.kirupa.com/u/impedicus)\
**Post date:** [January 31, 2006, 4:27pm UTC](https://forum.kirupa.com/t/stop-mc-motion-at-a-certain-point/177259/1 "2006-01-31T16:27:59Z")

</div>

The following block of script works as stated on [kirupa.com](http://kirupa.com) as far as moving to the right via the this.\_x += speed.

However, I am trying to modify it to stop scrolling if the the x pos. is less than 136. I am a bit of a noob-hack when it comes to actionscript syntax…as you can see below. please help!

Thanks in advance

onClipEvent (enterFrame) {  
speed = 1;  
this.\_x += speed;  
if (this.\_x\<=136) {  
speed = 0;  
}  
}

- the movement works, but it dosnt stop…
