# Clearinteval problem

**URL:** <https://forum.kirupa.com/t/clearinteval-problem/69433>\
**Category:** Uncategorized\
**Created:** [November 4, 2004, 12:39pm UTC](https://forum.kirupa.com/t/clearinteval-problem/69433 "2004-11-04T12:39:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mjward81](https://avatars.discourse-cdn.com/v4/letter/m/f07891/32.png) [@mjward81](https://forum.kirupa.com/u/mjward81)\
**Post date:** [November 4, 2004, 12:39pm UTC](https://forum.kirupa.com/t/clearinteval-problem/69433/1 "2004-11-04T12:39:54Z")

</div>

trying to clear this set interval, for some reason it isnt working

```auto

 
function gametimer() { 
//timer._rotation += 1.58; 
nTimes++;
trace(nTimes);
if (nTimes >= 10){
clearInterval(nInterval);
}
} 
 
var nTimes:Number 
nTimes = 0;
nInterval = setInterval(gametimer,1000); 
 
 

```

For some reason it isn’t clearing the interval

any suggestions?
