# clearInterval not working

**URL:** <https://forum.kirupa.com/t/clearinterval-not-working/147878>\
**Category:** Uncategorized\
**Created:** [May 14, 2005, 8:50pm UTC](https://forum.kirupa.com/t/clearinterval-not-working/147878 "2005-05-14T20:50:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Septunas](https://avatars.discourse-cdn.com/v4/letter/s/ba8739/32.png) [@Septunas](https://forum.kirupa.com/u/Septunas)\
**Post date:** [May 14, 2005, 8:50pm UTC](https://forum.kirupa.com/t/clearinterval-not-working/147878/1 "2005-05-14T20:50:28Z")

</div>

Hello, I’m almost done with a photographers project.

There is is still one big bug inside that I can’t find.  
I use an interval to verify when someone scales the browser when tweening, afterwards it shows correctly.  
The problem is that sometimes the **clearInterval doesn’t work**  
It always happens after a while when I click next or prev too fast  
Also bothering is just before the bug, the image scales to very small (sometimes)

```auto
 
function sizeInterval2 ()
{
loaderback._width = containerMC._width + 10
loaderback._height = containerMC._height + 10
centering ()
trace ("hallo")
**clearInterval (sizeInterval)**
}
function getimage ()
{
onEnterFrame = function ()
{
centering ()
maxsize ()
if (loaderback._width == containerMC._width + 10 )
{
delete onEnterFrame;
[color=black]**sizeInterval = setInterval (sizeInterval2, 1000)**
[/color]loadState = 1
containerMC.alphaTo (100, 1);
centering ()
}
}
}

```

If you want to check it, just keep the right key pressed:  
[http://test.crea-room.com](http://test.crea-room.com/)

Regards,
