# Changing Timer intervals

**URL:** <https://forum.kirupa.com/t/changing-timer-intervals/312352>\
**Category:** flash\
**Created:** [July 31, 2010, 9:07pm UTC](https://forum.kirupa.com/t/changing-timer-intervals/312352 "2010-07-31T21:07:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![coggia](https://avatars.discourse-cdn.com/v4/letter/c/8c91f0/32.png) [@coggia](https://forum.kirupa.com/u/coggia)\
**Post date:** [July 31, 2010, 9:07pm UTC](https://forum.kirupa.com/t/changing-timer-intervals/312352/1 "2010-07-31T21:07:12Z")

</div>

Hello,  
I’d like to change a timer interval, but I dunno how to do it,  
In my code i first initialize the timer with a selected interval with :

```auto

gameTimer=new Timer(interval,0);
 gameTimer.addEventListener(TimerEvent.TIMER, IALoop);
 gameTimer.start();

```

then, i need afterwards to change the interval, so I try to stop the timer, remove the listener

```auto

gameTimer.stop();
gameTimer.removeEventListener(TimerEvent.TIMER, IALoop);

```

and when I init again the timer with the same code:

```auto

gameTimer=new Timer(interval,0);
 gameTimer.addEventListener(TimerEvent.TIMER, IALoop);
 gameTimer.start();

```

it’s like if i had 2 timers, and when i stop the timer, it continues, I guess it’s because of the new object that i create, but i can’t found a method to change the interval of the existing timer…
