# Replaying an onEnterFrame function?

**URL:** <https://forum.kirupa.com/t/replaying-an-onenterframe-function/215479>\
**Category:** Uncategorized\
**Created:** [February 7, 2007, 4:51pm UTC](https://forum.kirupa.com/t/replaying-an-onenterframe-function/215479 "2007-02-07T16:51:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![CraigMayhem](https://avatars.discourse-cdn.com/v4/letter/c/3ab097/32.png) [@CraigMayhem](https://forum.kirupa.com/u/CraigMayhem)\
**Post date:** [February 7, 2007, 4:51pm UTC](https://forum.kirupa.com/t/replaying-an-onenterframe-function/215479/1 "2007-02-07T16:51:47Z")

</div>

Hey gang!

Got a piece of code that moves a line of text I’m calling “eeScroller”. I’m using this method because timeline and as tweens make the movement herky jerky (when the movement is slow).

What I want to do is reset the \_x of eeScroller to 0.9 once it reaches the \_x of -889.3

Here’s what I got so far:

```auto

function movething() {
 _root.eeScroller.onEnterFrame = function() {
  if (_root.eeScroller._x>=-889.3) {
   _root.eeScroller._x += -.75;
  }
 };
}
movething();

```

And that moves the movie clip… just need the reset script!

I can’t figure out how to implement onMotionFinished if that’s even the way to do it…

Help!

Thanks!
