# Help in making Game Scores using global variable

**URL:** <https://forum.kirupa.com/t/help-in-making-game-scores-using-global-variable/291028>\
**Category:** flash\
**Created:** [June 23, 2009, 9:13pm UTC](https://forum.kirupa.com/t/help-in-making-game-scores-using-global-variable/291028 "2009-06-23T21:13:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghpnewyork](https://avatars.discourse-cdn.com/v4/letter/g/87869e/32.png) [@ghpnewyork](https://forum.kirupa.com/u/ghpnewyork)\
**Post date:** [June 23, 2009, 9:13pm UTC](https://forum.kirupa.com/t/help-in-making-game-scores-using-global-variable/291028/1 "2009-06-23T21:13:31Z")

</div>

Hi,

I need some help with AS2, using global variable to track game scores throughout the game.

The game has 7 questions. Each frame will have one question and 3 answer options (they are in buttons).

If you get the right answer, the user will be taken to a new frame where he/she is congratulated.  
If you get the wrong answer, the user will be taken to another new frame where the correct answer is given.  
Right/Wrong answer frame will have a “next” button on the bottom for the user to move to the next question.

Now here is where I need help with!  
I want to have a score board in every frame. Each time the user makes the right choice, he/she is given 1 or 5 points. If not, no score is given.  
Since I am moving from frame to frame I know I have to use a global variable.

I’m a beginner when it comes to AS2 so if anyone can give me a detailed code in how to make the scores possible, it will be greatly appreciated.

Thank you!

```
                                                                   [IMG]http://www.actionscript.org/forums/images/misc/progress.gif[/IMG] [[IMG]http://www.actionscript.org/forums/images/buttons/edit.gif[/IMG]](http://www.actionscript.org/forums/editpost.php3?do=editpost&p=895754)
```
