Door problems

:beam: hi,

im currently working on a pokemon game and i am trying to make it when you can go up to the door and press enter it goes inside but with the code im useing which i just made up and put on the door onClipEvent
(enterFrame) {
if (Key.isdown(key.ENTER)) {
play();
}
}
works but i can go inside where ever i am so do i need to put a diffrent code or can i just not do it?