Key Press help needed!

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 :

on (keyPress "r") {
on (keyPress "g") {
on (keyPress "y") {
on (keyPress "b") {

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.