# setInterval active forever?

**URL:** https://forum.kirupa.com/t/setinterval-active-forever/97071
**Category:** Uncategorized
**Created:** [December 17, 2003, 1:16pm UTC](https://forum.kirupa.com/t/setinterval-active-forever/97071 "2003-12-17T13:16:38Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![j0se](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/j0se/32/44_2.png) [@j0se](https://forum.kirupa.com/u/j0se)
#### Post date: [December 17, 2003, 1:16pm UTC](https://forum.kirupa.com/t/setinterval-active-forever/97071/1 "2003-12-17T13:16:38Z")

</div>

I have a mc with a setInterval that calls a function repeatedly to load external jpgs

The mc in question is a little movie in a bigger movie, and plays only when you click button A.

Problem: When the mc is playing, you click button B to play a different mc in it’s place. However, the output window begins to throw up ‘path not found’ errors - so the setInterval is still active, even though the mc is no longer visible

Do I need to clear setInterval when I click button B?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 17, 2003, 1:19pm UTC](https://forum.kirupa.com/t/setinterval-active-forever/97071/2 "2003-12-17T13:19:30Z")

</div>

yes

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 17, 2003, 2:26pm UTC](https://forum.kirupa.com/t/setinterval-active-forever/97071/3 "2003-12-17T14:26:44Z")

</div>

Thanks Sen!

I’m away from my PC that’s why I’m asking (instead of just trying it)

I’ll give it a go when I get home  
:sure:

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [December 17, 2003, 2:32pm UTC](https://forum.kirupa.com/t/setinterval-active-forever/97071/4 "2003-12-17T14:32:18Z")

</div>

😃 welcome.

it was a simple and sweet answer. I wish all could be so easy.
