as a default, if you use "_up" and "_over" and "_down" as frame names and put a "stop();" on the first frame for the movieclips you want to use as buttons, the flash player will set them to automatically work like buttons so you don't have to set your own MOUSE_OVER and MOUSE_OUT listeners on a parent timeline (for basic on/off/down, for other functionality you need to add those listeners). generally i put
Code:
stop();
this.buttonMode = true;
with _up and _over frame names, and i never get an issue with buttonMode screwing up.
you can also set a variable on the button timeline 1st frame and use that.
so the button looks like
Code:
stop();
this.buttonMode = true;
var toGoTo = 'people'
(assuming this is the people_mc, places_mc would define its own instance of toGoTo as 'places', and on and on)
and the main timeline looks like
Code:
stop();
people_mc.addEventListener(MouseEvent.CLICK, clickHandler);
places_mc.addEventListener(MouseEvent.CLICK, clickHandler);
function clickHandler(e:MouseEvent):void {
this.gotoAndStop(e.target.toGoTo);
}
not a ton of code.