[HELP] [REQUEST] Keyboard tapping actionscript to controlling flash game speed

I am currently doing a project in college and I have trouble on actionscripts.
Apparently, I am not good in scripting and I really need some help out here.

I am wondering is there any script that allow me to play a game such as a car racing game/running game by just controlling the speed by tapping the keyboard key.

the faster I tap the faster the car/character runs.

Any recommendations?