/ Published in: ActionScript 3
I've updated this snippet to remove the timer and null it after the function is repeated `repeat` times. You use it like this:
delay(functionname, [param1, param2], 350, 3);
This will call `functionname` three times with a 350 millisecond delay between each call and pass `param1` and `param2` to the function.
If you need to call a function that doesn't accept parameters, pass an empty array `[]` to the second argument.
delay(functionname, [param1, param2], 350, 3);
This will call `functionname` three times with a 350 millisecond delay between each call and pass `param1` and `param2` to the function.
If you need to call a function that doesn't accept parameters, pass an empty array `[]` to the second argument.