Follow on from Games: Keeping Score

Hi,

I have been looking at the keeping score tutorial: http://www.kirupa.com/developer/mx/score.htm
and have produced a game where scores are added when the user gets it right.

I want to play a frame when the score reaches 5.

I have tried:

if (score == 5) {
gotoAndPlay (144)
}
This doesnt appear to do anything. Any ideas? I am not sure I have put the code in the right place. (i put it on the frame)

Thanks

if(_root.score=5){
gotoAndPlay (144)
}

doesnt work either!