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
3)+30);
repeat._rotation = (20*(i*2));
}
}
attach();

[AS]
i = 0;
function attach() {
//for (i=0; i<40; i++) {
if(i >= 40) {
clearInterval(interval);
return;
}
repeat = attachMovie(“ball”, “ball”+i, i);
repeat._x = ((i3)+30);
repeat._y = ((i
3)+30);
repeat._rotation = (20*(i*2));
i++;

//}
}
interval = setInterval(attach,10);
[/AS]

cheers, nice one