# Key Press help needed!

**URL:** <https://forum.kirupa.com/t/key-press-help-needed/90680>\
**Category:** flash\
**Created:** [May 19, 2005, 7:11pm UTC](https://forum.kirupa.com/t/key-press-help-needed/90680 "2005-05-19T19:11:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ObjectionTango](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/objectiontango/32/984_2.png) [@ObjectionTango](https://forum.kirupa.com/u/ObjectionTango)\
**Post date:** [May 19, 2005, 7:11pm UTC](https://forum.kirupa.com/t/key-press-help-needed/90680/1 "2005-05-19T19:11:22Z")

</div>

I’m doing an interactive TV project for college and the site needs to be navigated via the “r” “g” “y” “b” keys.

I’m not entirely sure how to do this. Basically what i did do was add a script layer and the code :

```auto
on (keyPress "r") {
	gotoAndPlay(30);
}
on (keyPress "g") {
	gotoAndPlay(20);
}
on (keyPress "y") {
	gotoAndPlay(10);
}
on (keyPress "b") {
	gotoAndPlay(1);
}

```

However, it tells me i can’t use the on command there because it’s not a movie clip. Is there anyway i can do what i want to do a different way?

Thanks for you help.
