PDA

View Full Version : HELppp. smal probLem



brown_knite
February 17th, 2004, 08:22 PM
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.

Digigamer
February 17th, 2004, 11:35 PM
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.

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

brown_knite
February 18th, 2004, 08:52 PM
that doesnt work because the score is a dynamic text box and i cant give it an instance name because then it stops working. please help