# Having trouble advancing the timeline with keypresses

**URL:** https://forum.kirupa.com/t/having-trouble-advancing-the-timeline-with-keypresses/169482
**Category:** Uncategorized
**Created:** [November 16, 2005, 4:36pm UTC](https://forum.kirupa.com/t/having-trouble-advancing-the-timeline-with-keypresses/169482 "2005-11-16T16:36:47Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![benjamikeo](https://avatars.discourse-cdn.com/v4/letter/b/b782af/32.png) [@benjamikeo](https://forum.kirupa.com/u/benjamikeo)
#### Post date: [November 16, 2005, 4:36pm UTC](https://forum.kirupa.com/t/having-trouble-advancing-the-timeline-with-keypresses/169482/1 "2005-11-16T16:36:47Z")

</div>

I have a menu (that contain buttons) that slides in when the bottom of the screen is rolledOver. The buttons on the sliding menu work to advance the timeline, but I also want the timeline to advance when a key on the keyboard is pressed (the spacebar, for example). That is the part I can’t get to work. I tried to attach the “onKeypress” function, but it isn’t working. Can someone advise me into what I’m doing wrong? I attached an swf. Thanks alot!
