just push the timers into an array, then loop through the array to clear them all:with that function, you can then just call, clearAllTimers(timers); and it will do the job.Code:var timers:Array = new Array(); var i:Number = setInterval(....); timers.push(i); function clearAllIntervals(a:Array):Void { for(var i:Number=0; i<a.length; i++) { clearInterval(a[i]); } }




Reply With Quote