Hello,
I am having a hell of a time trying stop my tween class animation.
First the code that I have:
function whatTextAnim() {
var t1:Tween = new Tween(whatanim.gd, "_alpha", Regular.easeOut, 0, 100, 3, true);
var t1:Tween = new Tween(whatanim.gd, "_y", Back.easeOut, -100, 0, 2, true);
t1.onMotionFinished = function() {
var gdm:Tween = new Tween(whatanim.gdmini, "_alpha", Regular.easeOut, 0, 100, 1, true);
var t1b:Tween = new Tween(whatanim.gd, "_alpha", Regular.easeOut, 100, 0, 1, true);
var t1b:Tween = new Tween(whatanim.gd, "_x", Regular.easeOut, whatanim.gd._x, 200, 1, true);
var t2:Tween = new Tween(whatanim.ep, "_alpha", Regular.easeOut, 0, 100, 3, true);
var t2:Tween = new Tween(whatanim.ep, "_x", Back.easeOut, -200, 0, 2, true);
t2.onMotionFinished = function() {
var epm:Tween = new Tween(whatanim.epmini, "_alpha", Regular.easeOut, 0, 100, 1, true);
var t2b:Tween = new Tween(whatanim.ep, "_alpha", Regular.easeOut, 100, 0, 1, true);
var t2b:Tween = new Tween(whatanim.ep, "_y", Regular.easeOut, whatanim.ep._y, -100, 1, true);
var t3:Tween = new Tween(whatanim.cp, "_alpha", Regular.easeOut, 0, 100, 3, true);
var t3:Tween = new Tween(whatanim.cp, "_y", Back.easeOut, 100, 0, 2, true);
t3.onMotionFinished = function() {
var cpm:Tween = new Tween(whatanim.cpmini, "_alpha", Regular.easeOut, 0, 100, 1, true);
var t3b:Tween = new Tween(whatanim.cp, "_alpha", Regular.easeOut, 100, 0, 1, true);
var t3b:Tween = new Tween(whatanim.cp, "_x", Regular.easeOut, whatanim.cp._x, -200, 1, true);
var t4:Tween = new Tween(whatanim.mct, "_alpha", Regular.easeOut, 0, 100, 3, true);
var t4:Tween = new Tween(whatanim.mct, "_x", Back.easeOut, 200, 0, 2, true);
t4.onMotionFinished = function() {
var mctm:Tween = new Tween(whatanim.mctmini, "_alpha", Regular.easeOut, 0, 100, 1, true);
var t5:Tween = new Tween(whatanim.mct, "_alpha", Strong.easeOut, 100, 0, 2, true);
t5.onMotionFinished = function() {
whatanim.gd._alpha = 0;
whatanim.ep._alpha = 0;
whatanim.cp._alpha = 0;
whatanim.mct._alpha = 0;
whatanim.gdmini._alpha = 0;
whatanim.epmini._alpha = 0;
whatanim.cpmini._alpha = 0;
whatanim.mctmini._alpha = 0;
whatanim.gd._x = 0;
whatanim.gd._y = 0;
whatanim.ep._x = 0;
whatanim.ep._y = 0;
whatanim.cp._x = 0;
whatanim.cp._y = 0;
whatanim.mct._x = 0;
whatanim.mct._y = 0;
};
};
};
};
};
}
The code works how I want it to work…but the problem that I am looking to solve is when I press another active button, lets say to go to a different section of the site, during this animation it continues to play (i know how to make it invisible), I want to have it stop when another active button is pressed. Just in case someone decides to go to the section where the animation is, then to another section right away, then back there. If you do that now it restarts the animation but continues playing the other.
If this is confusing I apologize. If you can help I greatly appreciate it.
Thanks in advance.