Pausing for loop?
Pausing for loop?
- Started
- Last post
- 4 Responses
- tomkat
Is there a way to pause a for-loop in Flash?
So that every loop takes 500 milsecs for example?i found the setIInterval action but didn't figure how to use it in this way..
thanks,
- unfittoprint0
use a setinterval instead.
for example,
i=0
myLoop=setInterval(function(){
this["movie"+i].doThis();
++i;
if(i==limit){
clearInterval(myLoop);
}
}, 500)
- tomkat0
thanks for quick response ;)
i think i get it, but..isn't there a way to create a function that does nothing for the choosen time, and i can use it as a prototype for other movies..?
something i could call up like:pauseIt(500);
- unfittoprint0
something like
pauseIt = function(time){
stop()
pauseLoop = setInterval(function(){
play();
clearinterval(pauseLoop);
}, time)}
- tomkat0
yep.. I'll try that..
thanks.