# Onkeypress , when you hold any key down it keeps play only 1 frame instead of all of

**URL:** https://forum.kirupa.com/t/onkeypress-when-you-hold-any-key-down-it-keeps-play-only-1-frame-instead-of-all-of/115699
**Category:** Uncategorized
**Created:** [July 10, 2004, 11:59pm UTC](https://forum.kirupa.com/t/onkeypress-when-you-hold-any-key-down-it-keeps-play-only-1-frame-instead-of-all-of/115699 "2004-07-10T23:59:48Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mdjstudios](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@mdjstudios](https://forum.kirupa.com/u/mdjstudios)
#### Post date: [July 10, 2004, 11:59pm UTC](https://forum.kirupa.com/t/onkeypress-when-you-hold-any-key-down-it-keeps-play-only-1-frame-instead-of-all-of/115699/1 "2004-07-10T23:59:48Z")

</div>

ok, i have 1 mc, a stick figure. when i press right arrow key, it is constantly frozen at frame 21 because it keeps play 21 because i am holding down the right arrow key… u understand? take a look at my action script if you dont follow…

```auto
onClipEvent(enterFrame) {
	if(key.isDown(key.RIGHT)) {
		this._x +=5;
		_root.stick.gotoAndPlay(21);
	}
}
onClipEvent(enterFrame) {
	if(!Key.isDown(key.RIGHT) && (_root.stick.ru==1)) {
		_root.stick.gotoAndPlay(42);
	}
}
onClipEvent(enterFrame) {
	 if(_root.stick.ru==2) {
		_root.stick.gotoAndPlay(2);
	}
}

```

please help im trying to create a game…
