# setInterval for \_root.nextFrame();

**URL:** <https://forum.kirupa.com/t/setinterval-for--root-nextframe/174772>\
**Category:** flash\
**Created:** [January 9, 2006, 8:17am UTC](https://forum.kirupa.com/t/setinterval-for--root-nextframe/174772 "2006-01-09T08:17:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![East\_High](https://avatars.discourse-cdn.com/v4/letter/e/6de8d8/32.png) [@East\_High](https://forum.kirupa.com/u/East_High)\
**Post date:** [January 9, 2006, 8:17am UTC](https://forum.kirupa.com/t/setinterval-for--root-nextframe/174772/1 "2006-01-09T08:17:46Z")

</div>

Hey,  
How can I use setInterval to start and stop the root timeline? I would like to use it in this little fade function wherein the setInterval would kick into effect once the alpha is 100%. You can see where I think it needs to go. Here’s the code.

```auto
stop();
variable = x+5;
title_mc._alpha = 0;
function fade() {
	var nFadeSpeed = 4;
	if (title_mc._alpha>100) {
		delete this.onEnterFrame;
		setInterval(nextFrame, 10000);
	}
	title_mc._alpha += nFadeSpeed;
}
onEnterFrame = fade;

```

Please and thank you!  
East High
