[AS2] Score board for a simple game show
Hi, let me explain what I need to do.
I need to create a score board for a game show that our company have for our staff. So there must be a score on the left and a score on the right (let's call them left_score and right_score) They must both start at 0. then when I click the left arrow button the left score must increase by 1 and if I press the right arrow button the score in decrease with 1. The same must happen for the right_score only now with the up and down arrows.
I have found something that works but it's only for 1 score. When I try to add both scores to the board then nothing happens when pressing buttons. see below example:
Frame1:
score=0;
Button:
on (keyPress "<Up>") {
score++;
}
on (keyPress "<Down>") {
score--;
}
Frame2:
stop();
The above code works with only 1 score on the board. What should I do to get both scores on the board and working when pressing keys.
Big Thanks in advance for any help.
|