Timed frame changes

Timed frame changes

Post by TheLibranD » Tue, 17 May 2005 06:12:52


I need help please! Does anyone know how I can time frames so that they change after a specified amount of time to the following frame?
 
 
 

Timed frame changes

Post by kgla » Tue, 17 May 2005 06:31:45

use setInterval().

 
 
 

Timed frame changes

Post by TheLibranD » Thu, 19 May 2005 02:00:39

Thanks for your help but I'm really mew to actionscript and I'm only using it
to do a short job very quickly, do you think you could post the full code I
would need to change from frame 1 to frame 2 after, say, 5 seconds?
 
 
 

Timed frame changes

Post by SMakinso » Thu, 19 May 2005 03:13:07

var numMyInterval:Number = setInterval(theFunctionToCall, 5000);

function theFunctionToCall():Void{
play();
}
 
 
 

Timed frame changes

Post by kgla » Thu, 19 May 2005 13:58:07

//define yourTime to be the amount of time in mseconds spent on each frame
nextI=setInterval(nextF,yourTime);
function nextF(){
_root.nextFrame();
if(_root._currentframe==_root._totalframes){
clearInterval(nextI);
}
}