Hi,
I have an swf (page0) which is called in the main page (index) by pressing a button. Page0 has a tween function. At first, it works correctly, but when I press the button for a second time before the tween has finished, it continues working but it starts again. It duplicates. When I press the button a third time, it works 3 times and so on. I need to reload the tween so it works always the same way. How do I do this?
Thank you
page 0:
import mx.transitions.Tween;
import mx.transitions.easing.*;
var barTween1 : Tween = new Tween(mca, “_x”, Elastic.easeInOut, 0, 130, 2, true);
barTween1.onMotionFinished = function() {
var barTween2:Tween = new Tween(mca, “_x”, Elastic.easeIn, 130, 260, 2, true);
barTween2.onMotionFinished = function() {
var barTween3:Tween = new Tween(mca, “_x”, Elastic.easeIn, 260, 390, 2, true);
}
}