# Slide menu navigation

**URL:** <https://forum.kirupa.com/t/slide-menu-navigation/241643>\
**Category:** flash\
**Created:** [October 16, 2007, 2:26pm UTC](https://forum.kirupa.com/t/slide-menu-navigation/241643 "2007-10-16T14:26:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![honey4d](https://avatars.discourse-cdn.com/v4/letter/h/5f8ce5/32.png) [@honey4d](https://forum.kirupa.com/u/honey4d)\
**Post date:** [October 16, 2007, 2:26pm UTC](https://forum.kirupa.com/t/slide-menu-navigation/241643/1 "2007-10-16T14:26:44Z")

</div>

Hello.

I’m trying to put together a sideshow using a modification of load\_images.fla (a sample file supplied with Flash) combined the the ‘Kirupa Menu with Slider’ tutorial ([http://www.kirupa.com/developer/mx2004/menu\_with\_slider.htm](http://www.kirupa.com/developer/mx2004/menu_with_slider.htm))

The slideshow uses a ‘next’ & ‘previous’ button to click thought the images. In addition to this I have a separate slide menu navigation (currently just numbers 1-7), with a rectangle highlighting the number of the image being viewed.

I would like to move the rectangle to show which image is being viewed, when the ‘next’ or ‘previous’ button is pressed.

The follow code shows the actionscript for the ‘next’ & ‘previous’ buttons…

```auto
next_btn.onPress = function() {
	if (whichPic<7 && !fadeIn && !fadeOut) {
		fadeOut = true;
		whichpic++;
		input = whichPic;
		//slider.xMove = button_7._x;
	}
};
back_btn.onPress = function() {
	if (whichPic>1 && !fadeIn && !fadeOut) {
		fadeOut = true;
		whichpic--;
		input = whichPic;
	}
};

```

…as a test the commented code ‘slider.xMove = button\_7.\_x;’ will advance the rectangle to 7 but I would like it to just advance either way when the button is clicked.

I guess what it needs is something like…

```auto
slider.xMove = "button_"+whichPic+"._x";

```

…but that doesn’t work.

Any help would be appreciated.
