# Motion Tween / Looping Help Needed

**URL:** <https://forum.kirupa.com/t/motion-tween-looping-help-needed/258282>\
**Category:** flash\
**Created:** [April 22, 2008, 6:35pm UTC](https://forum.kirupa.com/t/motion-tween-looping-help-needed/258282 "2008-04-22T18:35:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![saenim](https://avatars.discourse-cdn.com/v4/letter/s/ed655f/32.png) [@saenim](https://forum.kirupa.com/u/saenim)\
**Post date:** [April 22, 2008, 6:35pm UTC](https://forum.kirupa.com/t/motion-tween-looping-help-needed/258282/1 "2008-04-22T18:35:33Z")

</div>

Hi,

Please help if you can. I have a movie clip (panel1) that is motion tweened (in as) to go left-right across the stage. What would be the code to make it stop after a couple of times of going back and forth (disappearing at the end) AND then have a second movie clip activate (that’s been on the stage - but behind it all along).

Thanks.

//code for the tween  
var xt:Tween = new Tween(panel1, “\_x”, Regular.easeIn, -180, 750, 60, false);  
xt.onMotionFinished = function() {

```
this.yoyo();

```

};
