# activeMenu and Thumbnails

**URL:** https://forum.kirupa.com/t/activemenu-and-thumbnails/277288
**Category:** flash
**Created:** [December 10, 2008, 10:46am UTC](https://forum.kirupa.com/t/activemenu-and-thumbnails/277288 "2008-12-10T10:46:32Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![cresp](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@cresp](https://forum.kirupa.com/u/cresp)
#### Post date: [December 10, 2008, 10:46am UTC](https://forum.kirupa.com/t/activemenu-and-thumbnails/277288/1 "2008-12-10T10:46:32Z")

</div>

Hi there.  
I’m having a problem with changing the active state of my thumbnails in a photo gallery.

When directly clicked, the thumbnails change to ‘Active’, and all is good.

But what I would like to do is also have them controlled by the timeline, so when I click forward and back, the relevant thumbnail is active, and the previous one goes back to it’s ‘Down’ state.

I’d like to think I can just add the ‘clicked’ state to the relevant part of the timeline, but it won;t work.

Hope that makes sense, here is the code :

```auto

activeMenu = undefined;

t1.onRollOver = over;
t1.onRollOut = out;
t1.onPress = clicked;

t2.onRollOver = over;
t2.onRollOut = out;
t2.onPress = clicked;

t3.onRollOver = over;
t3.onRollOut = out;
t3.onPress = clicked;

function over () {
	if(this._name !=_root.activeMenu._name) {
	this.gotoAndPlay(2);
}
}
function out () {
	if(this._name !=_root.activeMenu._name) {
	this.gotoAndPlay(3);
}
}

function clicked() {
	if(_root.activeMenu != undefined) {
		_root.activeMenu.gotoAndPlay(3);
	}
	this.gotoAndStop(2);
	_root.activeMenu = this;
}

```

Thanks in advance!

C
