activeMenu and Thumbnails

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 :


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