# Multiple setInterval - how?!

**URL:** <https://forum.kirupa.com/t/multiple-setinterval-how/228048>\
**Category:** Uncategorized\
**Created:** [June 5, 2007, 12:32am UTC](https://forum.kirupa.com/t/multiple-setinterval-how/228048 "2007-06-05T00:32:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Head\_In\_A\_Pan](https://avatars.discourse-cdn.com/v4/letter/h/c67d28/32.png) [@Head\_In\_A\_Pan](https://forum.kirupa.com/u/Head_In_A_Pan)\
**Post date:** [June 5, 2007, 12:32am UTC](https://forum.kirupa.com/t/multiple-setinterval-how/228048/1 "2007-06-05T00:32:27Z")

</div>

Hello!

I am trying to execute a series of events with intervals, all from the one frame of AS.  
It’s not working - I don’t get it.

```auto

stop();

import mx.transitions.Tween;
import mx.transitions.easing.*;

var alphaFade:Tween;
//Fade car & A1 in...
alphaFade = new Tween(a1_mc, "_alpha", Strong.easeOut, 0, 100, 5, true);
alphaFade = new Tween(car_mc, "_alpha", Strong.easeOut, 0, 100, 5, true);

//Fade text 1 in...
secondFunction = function(){
    alphaFade = new Tween(text1_mc, "_alpha", Strong.easeOut, 0, 100, 5, true);
clearInterval(myInterval1);
}

var myInterval1 = setInterval(this,"secondFunction", 2000);

//Fade text 1 out...
thirdFunction = function(){
    alphaFade2 = new Tween(text1_mc, "_alpha", Strong.easeOut, 100, 0, 5, true);
clearInterval(myInterval2);
    }

var myInterval2 = setInterval(this,"thirdFunction", 2000);

```
