# Stopping a movieclip

**URL:** https://forum.kirupa.com/t/stopping-a-movieclip/280730
**Category:** flash
**Created:** [January 30, 2009, 8:40pm UTC](https://forum.kirupa.com/t/stopping-a-movieclip/280730 "2009-01-30T20:40:33Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![saintdave](https://avatars.discourse-cdn.com/v4/letter/s/e9bcb4/32.png) [@saintdave](https://forum.kirupa.com/u/saintdave)
#### Post date: [January 30, 2009, 8:40pm UTC](https://forum.kirupa.com/t/stopping-a-movieclip/280730/1 "2009-01-30T20:40:33Z")

</div>

stop a movie clip…

here is my code:

ship\_mc.onEnterFrame = function() {  
ship\_mc.\_x += 15;  
}

What I need is this clip to move until x = 151, then stop. My spaceship will fly across the screen and then stop in the center…how do I make it happen?
