code:
blinkTime = random(3000)+1000;//should initialize in the function but just in case it doesnt
function blink() {
blinkTime = random(3000)+1000;//set time to wait for the interval
evilblink.gotoAndPlay("blink");//does the blinking stuff
clearInterval(blinker);
//clears the interval so a new amount of time can be used
Blinkorama();//resets the interval with the new time
}
function Blinkorama() {
blinker = setInterval(blink,blinkTime);
//blinker is the interval name, blink is the function to be called
//blinkTime is of course the amount of time till it is called
}
Blinkorama();