Button code being a real pain - easy one!

	var gallery="galleryone";
	var button="tabone";

buttons.tabtwo.buttontwo.onRelease = function() {

	_root.galleries[gallery].gotoAndPlay(2);
	buttons[button].gotoAndPlay(22);
	buttons.tabtwo.gotoAndPlay(2);
	gallery = "gallerytwo";
	button = "buttontwo";

};

buttons.tabone.buttonone.onRelease = function() {

	_root.galleries[gallery].gotoAndPlay(2);
	buttons[button].gotoAndPlay(22);
	buttons.tabone.gotoAndPlay(2);
	gallery = "galleryone";
	button = "buttonone";
	
};

Ok- so the idea is that when you click a button it plays the movies assigned to the variables gallery & button to the frames mentioned.

Then the variables are changed and then when another buttons is clicked it does the same - 'except it doesn’t - it does it once then sits there ;(

I have to use variables because there’s a lot more buttons…but i don’t understand why it doesn’t work - it seems such a simple and obvious thing to try and do - why is it so HARD???

help me…

:p: