2 player jeopardy (as 2.0)

Hello, I’m doing a 2 player jeopardy game for a school project and I’m having some problems.

This is how it works: When the players see the question they have to press a button on the keyboard and the player who press first gets to answear.
Lets say player 1 have to press left arrow key and player 2 right arrow key, how do I do so when for example player 1 press the key first player 2’s key take no action?

and also when the player who press first gets to answear he has to hold down his key and at the same time press the answear he think is right. So I need something that knows who pressed first to tell what key that need to be pressed to allow an answear.

Heres the code I have atm:

for the key press:

onClipEvent (enterFrame) {

    if (Key.isDown(Key.RIGHT)){
        _root.wp.text += "player 2 gets to answear";
        
    }
}
onClipEvent (enterFrame) {

        
    if (Key.isDown(Key.LEFT)){
        _root.wp.text += "player 1 gets to answear";
    }
}

for the answear button (here I need something that does that only the player who pressed first gets to answear):



        on (release) {
    if (Key.isDown(Key.LEFT))
{
        
            this.gotoAndStop(2);
        
        }}
        

Thanks and sorry for bad english
// Simon

in the way you are doing it the statements are being executed one after the other, thereby giving a upperhand to the first key check. so in this situation i would suggest using a key listener. key listeners are described beautifully on this very site…just look for it, and you will get the job done in no time.

Also , this might help http://www.video-animation.com/flash8_024.shtml

hehe I thought one of my fingers where a bit faster then the other when trying it out because most of the time player 1 won =)

thanks
//Simon

You write very well, support you 屋顶风机 [url=http://zjjuying.com/2_5.html]轴流风机 [url=http://zjjuying.com/products.html]排烟风机 [url=http://zjjuying.com/3_4.html]离心风机 [url=http://zjjuying.com/2_2_3.html]混流风机]