ActionScript 3 Delay Function


/ Published in: ActionScript 3
Save to your folder(s)

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.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.