# Stop yoyo

**URL:** <https://forum.kirupa.com/t/stop-yoyo/167336>\
**Category:** Uncategorized\
**Created:** [October 27, 2005, 11:42am UTC](https://forum.kirupa.com/t/stop-yoyo/167336 "2005-10-27T11:42:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ditti](https://avatars.discourse-cdn.com/v4/letter/d/58f4c7/32.png) [@ditti](https://forum.kirupa.com/u/ditti)\
**Post date:** [October 27, 2005, 11:42am UTC](https://forum.kirupa.com/t/stop-yoyo/167336/1 "2005-10-27T11:42:10Z")

</div>

Hi!  
I have had this question in [ActionScript.org](http://ActionScript.org) Forum but didn´t get any answers so I try again here in Kirupa.  
I have this code which is working alright.

```auto
var myx_tween:Object = new Tween(jojjox, "_x", Regular.easeIn, jojjox._x, jojjox_end._x, 3, true);
var myy_tween:Object = new Tween(jojjox, "_y", Regular.easeIn, jojjox._y, jojjox_end._y, 3, true);
myy_tween.onMotionFinished = function() {
myx_tween.yoyo();
myy_tween.yoyo();
};

```

Now I want the yoyo to stop when I press a button. I have tried with  
myx\_tween.stop();  
myy\_tween.stop();  
but it doesn´t work. If someone knows how to stop it I would be quit happy.
