# Tween function Advice needed?

**URL:** https://forum.kirupa.com/t/tween-function-advice-needed/288180
**Category:** flash
**Created:** [May 12, 2009, 3:41pm UTC](https://forum.kirupa.com/t/tween-function-advice-needed/288180 "2009-05-12T15:41:20Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![nighteagle](https://avatars.discourse-cdn.com/v4/letter/n/bcef8e/32.png) [@nighteagle](https://forum.kirupa.com/u/nighteagle)
#### Post date: [May 12, 2009, 3:41pm UTC](https://forum.kirupa.com/t/tween-function-advice-needed/288180/1 "2009-05-12T15:41:20Z")

</div>

I’m working on an application where several object have to be tweened with similar animation. I have this part of code:

```auto

var moveTween:Tween;

function moveObj(obj:MovieClip, startValue:Number, endValue:Number, duration:Number):void {
    moveTween = new Tween(obj, "x", null, startValue, ednValue, duration, true);
}

```

I start the function at the same time for several object, and it’s work, but there is a bugs very often. For exsample the animation stops befor it is finished.  
Could it be because of the calling the new Tween for the moveTween variable which is still in progress?

My experiments show that in Enternet Explorer 6 and 7 there is no such a problem (or at least i didn’t notice some).

Did someone had similar problem and can you give some advice?  
Thanks
