You have 2 options on coding buttons.
a) place the code on the button symbol itself.
eg..
on(release){
_root.gotoAndPlay("slide1");
}
what this will do is, when the button is Pressed and RELEASED, the playhead
will goto and play frame "slide1" (frame label is slide1)
b) place the code on a frame (reccomended)
sg..
your_btn.onRelease = function(){
_root.gotoAndPlay("slide1");
}
this does the exact same thing, the only difference is that it is placed on a
frame instead of the button symbol its self.
This is a better way to code your flash work, because you can keep all your
code on the one frame which will keep the FLA clean, and verry easy to edit in
the future.
NOTES:
- TO LABEL A FRAME, select the frame you wish to give a label to, then at the
bottom left of your screen in the properties inspector, you will see a text
field, this is where you specify a frame name of your choice.
- _root means your MAIN timeline. I suggest you make a new movieClip
(Ctrl+F8) make sure you chose Movie Clip as the type, and give it a NAME, then
place all your buttons inside that movieClip's time line.
Hope this helps you out abit.