all groups > flash actionscript > april 2006 >
You're in the

flash actionscript

group:

Re: setInterval


Re: setInterval irtony
4/1/2006 10:59:48 PM
flash actionscript:
I really appreciate your help on this, thanks. Here is where I stand so far.

This is in the first panel:

stop();
rclip=_root.createEmptyMovieClip("dataHandlerMC",1);
rclip.loadVariables("timer.txt");
rclip.onData=function(){
delay=this.delay

function(movePanels){
_root.gotoAndPlay(2);
}
moveInterval = setInterval(movePanels, Number(delay));
}

Isn't the setInterval supposed to trigger the function? nothing happens.
Re: setInterval kglad
4/2/2006 1:36:12 AM
if there were a function called movePanels it would be triggered after loading
of timer.txt is completed. try:

rclip=_root.createEmptyMovieClip("dataHandlerMC",1);
rclip.loadVariables("timer.txt");
rclip.onData=function(){
delay=this.delay
moveInterval = setInterval(movePanels, Number(delay));
}

function movePanels(){
_root.gotoAndPlay(2);
}
AddThis Social Bookmark Button