# Help with: on key press -\> goto and play

**URL:** <https://forum.kirupa.com/t/help-with-on-key-press-goto-and-play/324362>\
**Category:** flash\
**Created:** [August 17, 2011, 1:44am UTC](https://forum.kirupa.com/t/help-with-on-key-press-goto-and-play/324362 "2011-08-17T01:44:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Catweasel](https://avatars.discourse-cdn.com/v4/letter/c/b5a626/32.png) [@Catweasel](https://forum.kirupa.com/u/Catweasel)\
**Post date:** [August 17, 2011, 1:44am UTC](https://forum.kirupa.com/t/help-with-on-key-press-goto-and-play/324362/1 "2011-08-17T01:44:41Z")

</div>

Hello all,

i am a designer and not so good with AS.  
I have read quite some forums but did not succeed.

Here is what i want to do:

For a presentation i need to tell Flash to go to a certain Keyframe after pressing  
a specific key on the keyboard.

So like:  
on(release, keyPress “\<a\>”)  
{  
gotoAndPlay(“2”);  
}

How can i do this?  
The standard keys like \<space\> or arrow keys like \<up\> etc.are not the solution  
because i need the whole keyboard keys as i want to link to many keyframes.

I am aware that the keyboard keys have the following keycodes:  
[http://people.uncw.edu/tompkinsj/112/flashactionscript/keycodes.htm](http://people.uncw.edu/tompkinsj/112/flashactionscript/keycodes.htm)

Can anybody help me with this?  
Basicaly i just want to jump between keyframes by pressing keys and not using the mouse.

Thanks in advance!
