# HELppp. smal probLem

**URL:** <https://forum.kirupa.com/t/helppp-smal-problem/101933>\
**Category:** Uncategorized\
**Created:** [February 18, 2004, 1:22am UTC](https://forum.kirupa.com/t/helppp-smal-problem/101933 "2004-02-18T01:22:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brown\_knite](https://avatars.discourse-cdn.com/v4/letter/b/439d5e/32.png) [@brown\_knite](https://forum.kirupa.com/u/brown_knite)\
**Post date:** [February 18, 2004, 1:22am UTC](https://forum.kirupa.com/t/helppp-smal-problem/101933/1 "2004-02-18T01:22:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 18, 2004, 4:35am UTC](https://forum.kirupa.com/t/helppp-smal-problem/101933/2 "2004-02-18T04:35:25Z")

</div>

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]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 19, 2004, 1:52am UTC](https://forum.kirupa.com/t/helppp-smal-problem/101933/3 "2004-02-19T01:52:56Z")

</div>

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
