I'm been building a whack a mole-style game, the moles randomly selected using the "gotoAndStop(random(25));" where it will pick from 25 frames of different movieclips.

Each movie clip is of a button which pops up and then goes back down if you miss it, at the end of the timeline in these movieclips I have put the code "_parent.gotoAndPlay (1);", making the main movieclip go back to the first frame and randomly select a new frame with a different movieclip in it.

This all works fine though for some reason it is re-setting the score back to zero each time it does this.

The score in in a separate layer of the main movie where in the first frame it sets the score to zero, bar that and a small bit of code on each buton saying when it is pressed to add 5 to the score that is it. In the second frame all the buttons/moles come in and the movie stops.

Is this a common problem? Am I using the "_parent." function incorrectly?

Any help is really appreciated!