Need to set and interval

right, how do I put a delay in my function, i want it to attach the ball, then wait 10 milliseconds, then attach another, how would i go about doing this, thanks

heres my code:

function attach() {
for (i=0; i<40; i++) {
repeat = attachMovie(“ball”, “ball”+i, i);
repeat._x = ((i3)+30);
repeat._y = ((i
repeat._rotation = (20*(i*2));