Gotoframe if statement

I’m trying to actionscript a button so that when clicked it goes to and stops on a frame(5) but if you are already on frame 5, it takes you back to the first frame and stops.

I have managed to get it to go to frame 5, but it will not go back to the first frame if you are already on frame 5.

If it matters, this in a movie clip within my movie.

The actionscript i am trying…

“on(release) {
if (bottom_clp._currentframe = 1) {
gotoandstop(5);
}
else {
gotoandstop(1);
}
}”

Many thanks in advance.