# Tween problem

**URL:** <https://forum.kirupa.com/t/tween-problem/264539>\
**Category:** Uncategorized\
**Created:** [June 26, 2008, 11:23pm UTC](https://forum.kirupa.com/t/tween-problem/264539 "2008-06-26T23:23:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kidyi](https://avatars.discourse-cdn.com/v4/letter/k/d2c977/32.png) [@kidyi](https://forum.kirupa.com/u/kidyi)\
**Post date:** [June 26, 2008, 11:23pm UTC](https://forum.kirupa.com/t/tween-problem/264539/1 "2008-06-26T23:23:36Z")

</div>

I am trying to tween a movie clip after a mouse click. It worked fine, but after clicking for a while, the tween function does not appear to start automatically.

Is there anything wrong I am doing here?

```auto

public function SelectionClicked(e:MouseEvent):void {
   //Calculate tweenTime and new Y value
   ...

  //This is always printed out after the click
  trace("Clicked");

  //The following don't seem to start automatically and so RunAnotherAnimation never //runs
   var yTween:Tween = new Tween(myClip, "y", None.easeNone, myClip.y, newY, tweenTime, true);

   yTween.addEventListener(TweenEvent.MOTION_FINISH, RunAnotherAnimation);
}

public function RunAnotherAnimation(e:TweenEvent)void{
   //This is sometimes not printed out
   trace("Finished");
}

```

---

<div class="post-metadata">

**Author:** ![Felixz](https://avatars.discourse-cdn.com/v4/letter/f/ecb155/32.png) [@Felixz](https://forum.kirupa.com/u/Felixz)\
**Post date:** [June 27, 2008, 7:07pm UTC](https://forum.kirupa.com/t/tween-problem/264539/2 "2008-06-27T19:07:32Z")

</div>

```auto
private var yTween:Tween = new Tween(myClip, "y", None.easeNone, myClip.y, newY, 0, true);
public function constructor() {
   yTween.addEventListener(TweenEvent.MOTION_FINISH, RunAnotherAnimation);
}
public function SelectionClicked(e:MouseEvent):void {
   //Calculate tweenTime and new Y value
   ...

  //This is always printed out after the click
  trace("Clicked");
   yTween.contimueTo(newY,2);
  //The following don't seem to start automatically and so RunAnotherAnimation never //runs

   }

public function RunAnotherAnimation(e:TweenEvent)void{
   //This is sometimes not printed out
   trace("Finished");
}

```
