Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > General > Gaming and Game Development

Reply
 
Thread Tools Rate Thread Display Modes
Old 06-06-2011, 12:11 PM   #1
tauretsman
Registered User
 
Join Date: Jun 2011
Posts: 2
Lightbulb [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.
tauretsman is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 09:07 PM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.