# {MX} simple movement question

**URL:** <https://forum.kirupa.com/t/mx-simple-movement-question/111638>\
**Category:** Uncategorized\
**Created:** [May 29, 2004, 5:22am UTC](https://forum.kirupa.com/t/mx-simple-movement-question/111638 "2004-05-29T05:22:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![D90](https://avatars.discourse-cdn.com/v4/letter/d/41988e/32.png) [@D90](https://forum.kirupa.com/u/D90)\
**Post date:** [May 29, 2004, 5:22am UTC](https://forum.kirupa.com/t/mx-simple-movement-question/111638/1 "2004-05-29T05:22:55Z")

</div>

have a question about flash of i have ok maybe you might be able to help ok ionClipEvent(enterFrame) {  
speed = -1; t  
his.\_y += speed

and i want it to stop after it goes up a bit but when i add a stop it dont go all together how would i do that???

would it be like this???

onClipEvent(load){  
this.onEnterFrame = function(){  
if(condition){  
delete this.onEnterFrame;  
} else { // do something; }

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 29, 2004, 5:36am UTC](https://forum.kirupa.com/t/mx-simple-movement-question/111638/2 "2004-05-29T05:36:25Z")

</div>

```auto

onLoad=function(){
startY = _root.McInstance._y;
stopY = startY-50;
speed = 1;
}
_root.McInstance.onEnterFrame = function() {
 if (this._y>=stopY) {
  this._y -= speed;
 } else {
  delete _root.McInstance.onEnterFrame;
 }
};

```

where your movie clip’s instance name is McInstance.

Adam
