# onEnterFrame (MX) HELP...why am I not getting this?!

**URL:** <https://forum.kirupa.com/t/onenterframe-mx-help-why-am-i-not-getting-this/105213>\
**Category:** Uncategorized\
**Created:** [March 24, 2004, 12:14am UTC](https://forum.kirupa.com/t/onenterframe-mx-help-why-am-i-not-getting-this/105213 "2004-03-24T00:14:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![beanpie](https://avatars.discourse-cdn.com/v4/letter/b/48db29/32.png) [@beanpie](https://forum.kirupa.com/u/beanpie)\
**Post date:** [March 24, 2004, 12:14am UTC](https://forum.kirupa.com/t/onenterframe-mx-help-why-am-i-not-getting-this/105213/1 "2004-03-24T00:14:22Z")

</div>

OK, I apologize if this is stupid and lame, but I need HELP. Just about blind from this:

Here is my code, attached to a movie clip:

onClipEvent(load){  
\_y=13.1;  
targety=-20.9  
speed=5;  
}

onClipEvent(enterFrame){  
\_y+=(targety-\_y)/speed;  
}

That’s great, it moves. And then it stops. And then it starts all over in the last frame.

I need some sort of If Else thing here, I think, to say “hey, once you’ve reached targety, please don’t go any further.” Somebody helped me out here a while back with a similar problem with alpha…only for some reason I can make the link in my logic to come up with the same thing for targety.

Please please help.

I really really need to finish this by midnight. (EST.).

Thanks in advance.

-B
