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>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();
}
};