Combine onRelease and onKeypress

Hello,

I would like to add an [COLOR=Black]on(keyPress “<Enter>”) [/COLOR]functionality to the following code:

_root.nextimageButton.onRelease = function() {
    if (_root.nextimageInput.text = 9) {
        _root.status.text = "You are now seeing image 9! ";

On the main stage, I have a button “nextimageButton”
and a text input to enter the image number, “nextimageInput”
When you click the button after typing in a number, it shows you the image corresponding to this number. I want to be able to also have the option to hit Enter .

I did use the on(release), on(kePress) combination before, but only on a button…
How could I integrate/combine the Enter key pressed to my code ( which is on a frame)?

Thanks