Hello, I’m kinda new to actionscript and I wonder if someone can help me with the code listed here. My goal is to change the time for setInterval each time the function is called. Planning to replace myInterval = 5000; with a randomized number. My problem is getting setInterval to recognize the myInterval variable from the function. Any thoughts on this?
var myInterval = 1000;
callback = function() {
_root.myMovie.gotoAndPlay(1);
myInterval = 5000;
}
setInterval(callback, myInterval);