# Whats wrong with setInterval

**URL:** <https://forum.kirupa.com/t/whats-wrong-with-setinterval/173466>\
**Category:** Uncategorized\
**Created:** [December 26, 2005, 2:03am UTC](https://forum.kirupa.com/t/whats-wrong-with-setinterval/173466 "2005-12-26T02:03:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mad\_man](https://avatars.discourse-cdn.com/v4/letter/m/58956e/32.png) [@mad\_man](https://forum.kirupa.com/u/mad_man)\
**Post date:** [December 26, 2005, 2:03am UTC](https://forum.kirupa.com/t/whats-wrong-with-setinterval/173466/1 "2005-12-26T02:03:44Z")

</div>

These two functions are taken out of my as class file, even though the setInterval is never cleared it only calls generateParticles 1 time. Someone please help me figure this out. I have been messing around with it over an hour but still can find why its only called once. emit is a private var Number declared outside the function in the class.

Thanks.

public function startEmit():Void  
{  
createMaster();

startTimer();  
emit = setInterval(generateParticles(), 100);  
}

private function generateParticles():Void  
{  
trace(“1”);  
}
