# \[FMX04\] Restart tween with different "begin"

**URL:** <https://forum.kirupa.com/t/fmx04-restart-tween-with-different-begin/246249>\
**Category:** flash\
**Created:** [December 8, 2007, 10:29pm UTC](https://forum.kirupa.com/t/fmx04-restart-tween-with-different-begin/246249 "2007-12-08T22:29:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![micheaster](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@micheaster](https://forum.kirupa.com/u/micheaster)\
**Post date:** [December 8, 2007, 10:29pm UTC](https://forum.kirupa.com/t/fmx04-restart-tween-with-different-begin/246249/1 "2007-12-08T22:29:23Z")

</div>

Hi,

Trying to build something that will tween (a variable) number of texts across a banner. Would like to start tween at random locations.

Problem is I can’t figure out how to restart tween at different location.  
I have code below which will restart tween at same location.  
Is this possible?  
Any one got any tips or examples?

Any info appreciated.  
Micheal (AS newbie)

/\* Loop for texts and tween each text \*/  
i = 1;  
// Assign first text  
text\_mc.myText.text = [“text”+i];  
// Text properties  
text\_mc.myText.autoSize = “left”;  
text\_mc.myText.embedFonts = true;  
// Initial tween  
var myTween\_x:Tween = new Tween(text\_mc, “\_x”, ease, startX(), 0, duration, true);

// startX(); random location

myTween\_x[“onMotionFinished”] = function () {  
i++;

```
if (i&gt;numTexts) {
    // if all texts played then goto end
    gotoAndPlay("end");
    
} else {
    // else load next text
    text_mc.myText.text = ["text"+i];
    myTween_x.rewind();
    myTween_x.start();             
}

```

};
