# Tween problems in ActionScript 3.0

**URL:** https://forum.kirupa.com/t/tween-problems-in-actionscript-3-0/301211
**Category:** flash
**Created:** [December 5, 2009, 5:23am UTC](https://forum.kirupa.com/t/tween-problems-in-actionscript-3-0/301211 "2009-12-05T05:23:45Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Code\_Studio](https://avatars.discourse-cdn.com/v4/letter/c/a698b9/32.png) [@Code\_Studio](https://forum.kirupa.com/u/Code_Studio)
#### Post date: [December 5, 2009, 5:23am UTC](https://forum.kirupa.com/t/tween-problems-in-actionscript-3-0/301211/1 "2009-12-05T05:23:45Z")

</div>

Hello!

I’m stuck with my problem and I have no idea what is wrong. I’m making movement of movie clip via creating new Tween in Action Script 3, Flash CS4 and it happens, when I mouse over button in another movie clip. The problem is that movement sometimes work perfectly, but sometimes it gets stuck in middle of movement and continues only if I mouse over again. Here is the code of function of first frame in main scene:

```auto

import fl.transitions.Tween;
import fl.transitions.easing.*;

function btnOver(I:Number) {
var tw: Tween = new Tween(somemovieclip, "x", Strong.easeOut, somemovieclip.x, I, 1, true);
}

```

Here is how I’m calling that function from another movie clip when I mouse over a button:

```auto

function over(eventObject:MouseEvent) {
(root as MovieClip).btnOver(288);
}

btn.addEventListener(MouseEvent.MOUSE_OVER, over);

```

I have several motions like this - for each button different variable for x position (number “I”). I also have another movie clip playing at the same time, but it isn’t connected with any of movie clips mentioned above.

Does anybody have an idea what is wrong?

P.S.: I’m on Mac with latest flash player and movie works better in Windows - it has less mistakes, but still they happen very rare. Probably the problem is somewhere inside player or something like that?

Thanks!
