# \[F8\] tap 2 buttons back and forth

**URL:** https://forum.kirupa.com/t/f8-tap-2-buttons-back-and-forth/253378
**Category:** flash
**Created:** [February 29, 2008, 4:19pm UTC](https://forum.kirupa.com/t/f8-tap-2-buttons-back-and-forth/253378 "2008-02-29T16:19:34Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jay0316](https://avatars.discourse-cdn.com/v4/letter/j/9de0a6/32.png) [@jay0316](https://forum.kirupa.com/u/jay0316)
#### Post date: [February 29, 2008, 4:19pm UTC](https://forum.kirupa.com/t/f8-tap-2-buttons-back-and-forth/253378/1 "2008-02-29T16:19:34Z")

</div>

Hey, I’m interested in creating a game where you tap 2 buttons alternating for example the left and right arrow keys that in turn makes a meter go up. Kind of like those old nintendo track and field games where you’d hit a and b back and forth as fast as possible to make the character go faster. In this case you’d be hitting them back and forth to raise a meter with the goal of getting it as high as you can.

Here is an example ([http://www.gamedesign.jp/flash/sprinter/sprinter.html](http://www.gamedesign.jp/flash/sprinter/sprinter.html)) of a game that does this.

I think this tutorial ([http://www.kirupa.com/developer/actionscript/multiple\_key\_detection.htm](http://www.kirupa.com/developer/actionscript/multiple_key_detection.htm)) is on the right track. It detects multiple key combinations except you have to hold the first key down and then press the second; where as, I would like to be able to tap the first key and then tap the second to make something happen.

Any help?

Thanks,  
Jason
