Pausing then restarting animation

heres the scoop i want to delay a function 1 sec after the last function has completed its animations whats the simplest way to code this. Im sort of leaning to set interval but i could be wrong could someone please help thanks

heres the code i have:


tweenBall();
function tweenBall() {
easeType = mx.transitions.easing.Strong.easeOut;
var begin = 99;
var end = 0;
var time = 1;
var mc = ball_mc;
ballTween = new mx.transitions.Tween(mc, “_xscale”, easeType, begin, end, time, true);
tweenBall1();
}
function tweenBall1() {
easeType = mx.transitions.easing.Strong.easeOut;
var begin = 0;
var end = 99;
var time = 1;
var mc = xmotion_mc;
ballTween = new mx.transitions.Tween(mc, “_xscale”, easeType, begin, end, time, true);
tweenBall2();
}
stop();
function tweenBall2() {
easeType = mx.transitions.easing.Strong.easeOut;
var begin = 0;
var end = 99;
var time = 1;
var mc = _xinteractive_mc;
ballTween = new mx.transitions.Tween(mc, “_xscale”, easeType, begin, end, time, true);
}
stop();

I haven’t looked through your code, but from your description, you could just have the function you want to call 1 second later called using setInterval() as you suggested. But then in the same function, you should have the function delete the setInterval, so it only executes once.

intervalID = setInterval(delayed, 1000);

function delayed(){
// Your code here;
clearInterval(intervalID);
}

hope this helps. :slight_smile: