# setInterval gone wild!

**URL:** <https://forum.kirupa.com/t/setinterval-gone-wild/151882>\
**Category:** programming\
**Created:** [June 19, 2005, 1:34am UTC](https://forum.kirupa.com/t/setinterval-gone-wild/151882 "2005-06-19T01:34:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Skribble](https://avatars.discourse-cdn.com/v4/letter/s/b487fb/32.png) [@Skribble](https://forum.kirupa.com/u/Skribble)\
**Post date:** [June 19, 2005, 1:34am UTC](https://forum.kirupa.com/t/setinterval-gone-wild/151882/1 "2005-06-19T01:34:32Z")

</div>

Hey guys. Was trying out setInterval, ive never used it before. I set it up to spawn a random ball every 3 seconds…but once the flash movie actualy PLAYS for the 3 seconds, then it calls the function every frame. Little help?

```auto
eSpawnInt = setInterval(eSpawn, 3000);
    function eSpawn() {
        _root.attachMovie("ballMC", "ballMC"+num, num, num++);
        _root["ballMC"+num]._x = random(550)+300;
    }
    clearInterval(eSpawnInt);

```
