# onMotionFinished Trouble

**URL:** https://forum.kirupa.com/t/onmotionfinished-trouble/213946
**Category:** flash
**Created:** [January 24, 2007, 2:30pm UTC](https://forum.kirupa.com/t/onmotionfinished-trouble/213946 "2007-01-24T14:30:56Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![thatguythatsme](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@thatguythatsme](https://forum.kirupa.com/u/thatguythatsme)
#### Post date: [January 24, 2007, 2:30pm UTC](https://forum.kirupa.com/t/onmotionfinished-trouble/213946/1 "2007-01-24T14:30:56Z")

</div>

Okay, Ive got a slideshow and for the slideshow counter I’ve decided to use a bar and tween classes to make it look nicer. I want it to grow slowly, then when it finishes switch the image, then shoot back and start again… Currently I have

```auto
var slideCounter:Tween = new Tween(slideBar, "_width", Regular.easeIn, 0, 640, 5, true);
slideCounter.onMotionFinished = function() {
    if (slideBar<=0) {
        this.continueTo(640, 5);
    } else {
        this.continueTo(0, 1.5);
    }
};

```

Now I’m begining to understand that onMotionFinished will only work only from the tweens position… It goes back but doesn’t restart itself again?

Anyone with any suggestions?

Dave
