Function pauseHere(pauseFor)

Hi everyone,

I am just puzzling through someone else’s actionscript. Can anyone tell me why you would use this kind of function in the first frame of a main timeline. What should the code below be doing. I tried cutting it out and it doesn’t seem to affect anything as far as i can tell.


function pauseHere(pauseFor){
pauseDuration = pauseFor*1000;
framesInLoop = 1;
if (startTime == null) {
startTime = getTimer();
gotoAndPlay(_currentframe-framesInLoop);
} else {
lapsedTime = getTimer()-startTime;
if (lapsedTime<pauseDuration) {
gotoAndPlay(_currentframe-framesInLoop);
} else {
startTime = null;
}
}
}


thanks for your help