Creating a menu with all code on one frame

hey all,

i’m just getting used to the idea of doing most of my coding in a frame rather than attaching it all to clips, and i’m not sure of whether i can do that for a menu.

i’ve got 4 buttons that take the user to different frames (labelled) in the root timeline. Now normallly i’d just put a piece of code on each button and change the frame it goes to, easy.

but as i’m trying to learn the best, most developer-friendly way to do things, i’m just wondering if there’s some way to do it… i realise i could call the buttons from the root, i.e :

menu.button1.onRelease=function(){

but i can’t really see an advantage to doing that for each button rather than just putting the code on the buttons within the menu clip anyway.

any tips? i realise that there are personal ways people do things, but as i said i’m just trying to learn as much as i can :slight_smile:

thanks
Stu