# Multiple Key Press Help

**URL:** https://forum.kirupa.com/t/multiple-key-press-help/271746
**Category:** flash
**Created:** [September 27, 2008, 5:34pm UTC](https://forum.kirupa.com/t/multiple-key-press-help/271746 "2008-09-27T17:34:17Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![StolenFED](https://avatars.discourse-cdn.com/v4/letter/s/35a633/32.png) [@StolenFED](https://forum.kirupa.com/u/StolenFED)
#### Post date: [September 27, 2008, 5:34pm UTC](https://forum.kirupa.com/t/multiple-key-press-help/271746/1 "2008-09-27T17:34:17Z")

</div>

I’m working on a simple game where the object is to hit as many keys as possible in a given time and then be given a score.

I have used the following code:

```auto
keyListener = new Object(
    keyListener.onKeyDown = function() {
        numlol++;
    };
    Key.addListener(keyListener);
}

```

However, when the time runs out and you’re taken to the screen where your score is displayed, the actionscript continues running and you still gain points by hitting the keys.

I’ve tried using a boolean, but it did not do anything. Any help?
