Gotoandplay

k what im doing is showing different photo sets on the same timeline for my site. so i thought i would have each photoset on a frame and each frame has the stop function on it to keep it from playing them all. so i have a button saying “set 1” and when you click that its supposed to play frame 5.
code on the button:
on (release) {
gotoAndPlay(7);
}

(set one is on frame 7) but this doesnt work i dont get it. whats wrong? is there a better way to do this?