# Wait for tween class ready (easy)

**URL:** https://forum.kirupa.com/t/wait-for-tween-class-ready-easy/209766
**Category:** flash
**Created:** [December 12, 2006, 8:16am UTC](https://forum.kirupa.com/t/wait-for-tween-class-ready-easy/209766 "2006-12-12T08:16:58Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Hommer](https://avatars.discourse-cdn.com/v4/letter/h/a3d4f5/32.png) [@Hommer](https://forum.kirupa.com/u/Hommer)
#### Post date: [December 12, 2006, 8:16am UTC](https://forum.kirupa.com/t/wait-for-tween-class-ready-easy/209766/1 "2006-12-12T08:16:58Z")

</div>

I have a menu, that I want to scroll according to mouse \_y movement.  
So I have the buttons in a mc, with the actions:

```auto

onClipEvent (enterFrame) {
	if (_parent._ymouse<149 && _parent._ymouse>7 && _parent._xmouse>13 && _parent._xmouse<138) {
		yPos = (-_parent._ymouse+35)/(this._height/165);
	}
}

```

And in the timeline, at frame 1, the actions:

```auto

import mx.transitions.Tween;
import mx.transitions.easing.*;
var yPos:Tween = new Tween(buttons, "_y", Strong.easeOut, 0, 50, 2, true);
buttons.onEnterFrame = function() {
	yPos.continueTo(buttons.yPos, 0.7);
};

```

But it doesn’t work. I’t seems like the ‘buttons.onEnterFrame’ function has to wait for the new Tween to finish. How do I work around this?
