var SI:Number; SIF(); function SIF(){ clearInterval(SI); ..... ..... ..... SI = setInterval(SIF,10*Math.random()); }