HELppp. smal probLem

hi, i am building a shooting game and i was wondering if it is possible to have the movie go to frame 3 if the score = 500.

I.E

Score is displayed in a dynamic text box and everytime the enemy is hit the:

_root.score +=50

on the first frame of the film i have the code

if (_root.score == 500) {
gotoAndPlay(3);
}

can someone tell me wat i am doing wrong or if this is even possible cause i have been trying and it doesnt seem to work, any help would be appreciated.

you need to put it in a clip event handler so it keeps checking. Right now it only checks when the movie is first loaded so something like this.

[AS]movieClip.onEnterFrame = function() {
if (_root.score == 500) {
gotoAndPlay(3);
}
}[/AS]