# Callback using setInterval.Pls help

**URL:** <https://forum.kirupa.com/t/callback-using-setinterval-pls-help/18478>\
**Category:** Uncategorized\
**Created:** [April 17, 2003, 1:50am UTC](https://forum.kirupa.com/t/callback-using-setinterval-pls-help/18478 "2003-04-17T01:50:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![illusion](https://avatars.discourse-cdn.com/v4/letter/i/e19b73/32.png) [@illusion](https://forum.kirupa.com/u/illusion)\
**Post date:** [April 17, 2003, 1:50am UTC](https://forum.kirupa.com/t/callback-using-setinterval-pls-help/18478/1 "2003-04-17T01:50:28Z")

</div>

:trout: jus wanna ask if some1 could help me with this: onClick the button, i am suppose to run the functions. There r 4 in all. but when i place the functions in setInterval, the flow does not run smoothly. how do i get the functions 2 flow continously and smoothly? The code goes like this:

on (press) {  
#include “LED\_code.as”

```
myInterrupt=function(){
	g=getTimer();
	if(g&gt;10000){
		clearInterval(idl);
	}
};
idl=setInterval(myInterrupt,1000);
setInterval(runFunction1,2000);
setInterval(runFunction2,4000);
setInterval(runFunction3,6000);

```

}
