# A little help with intervals

**URL:** <https://forum.kirupa.com/t/a-little-help-with-intervals/231101>\
**Category:** Uncategorized\
**Created:** [July 2, 2007, 7:30am UTC](https://forum.kirupa.com/t/a-little-help-with-intervals/231101 "2007-07-02T07:30:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Patch](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/patch/32/1095_2.png) [@Patch](https://forum.kirupa.com/u/Patch)\
**Post date:** [July 2, 2007, 7:30am UTC](https://forum.kirupa.com/t/a-little-help-with-intervals/231101/1 "2007-07-02T07:30:22Z")

</div>

Hi all! I need a little help with some stuff again. I’ve basically got a bit code that produces a line of numbers as navigation and most of it was written by stringy.

Here is the previous thread:

> **[Number navigation in gallery...](https://www.kirupa.com/forum/showthread.php?t=266639)**
>
> Got a web design/development question or just want to hang out with the most awesome people on the planet? Drop on in!

The buttons work, but when I click on them I also want my slideshow to stop and possibly stay highlighted.

here is the bit of code that controls selecting the image and stuff:

```auto
function dorelease() {
	clearInterval(myInterval);
	this._alpha = 100;
	p = this.ivar-1;
	nextImage();
}

```

The clearInterval stuff normally stops the slideshow, but in this location it doesn’t so I’m guessing it’s something to do with \_root or \_level etc. But for the life of me I can’t quite figure it out at the moment.

This is the bit of code that generates the buttons:

```auto

mask._visible = false;
function getButtons() {
	mask._width = 0;
	var clip = this.createEmptyMovieClip("paper", 10000);
	//clip.setMask(mask);
	clip._y = 556;
	clip._x = 10;
	for (var i = 0; i<cliparray.length; i++) {
		var clap = clip.attachMovie("btn", "btn"+i, i);
		clap._x = (clap._width+5)*i;
		clap.ivar = i;
		clap._alpha = 40;
		clap.myText.text = i+1;
		//clap.onPress = dopress;
		clap.onRelease = dorelease;
		//clap.onReleaseOutside= doreleaseOutside;
		clap.onRollOver = dorollover;
	    clap.onRollOut = dorollout;
	}
	//mask.onEnterFrame = grow;
}

```
