just wondering how to detect keyPresses on a EnterFrame function not a KeyboardEvent, this doesn't work anymore:

Key.isDown(Key.RIGHT)

i've imported flash.ui.Keyboard and tried getting the key presses like this:

var key:Keyboard = new Keyboard()

if(key.RIGHT){
//do something
}

but it don't work. Can't seem to find a solution within the reference because it only deals with KeyboardEvents.

Any help?