function doIt():Void { trace("trace it"); clearInterval(st); } var st:Number = setInterval(doIt, 500);