Hello There, I want to tween one object to the left corner of the screen, and right after it tweens out of the view, I want the second object to come in, but I don’t know how to do that.
Here’s my code:
_root.changeSlide = function(current) {
//---------------
import mx.transitions.Tween;
import mx.transitions.easing.*;
end_value = 0 - current._x/2;
_root.slide._y = Stage.height/2;
_root.slide._x = Stage.width + _root.slide._x/2;
onEnterFrame = function() {
var myTween = new Tween(_root.logo, "_x", Strong.easeOut, _root.logo._x, end_value, 4, true);
if (//how to check if the tween finished?) {
var myTween = new Tween(_root.slide, "_x", Strong.easeOut, _root.slide._x, Stage.width/2, 4, true);
if (//how to check if the tween finished?) {
delete this.onEnterFrame
}
}
}
}