# On(release, keyPress "\<Enter\>")

**URL:** <https://forum.kirupa.com/t/on-release-keypress-enter/62000>\
**Category:** Uncategorized\
**Created:** [August 24, 2004, 2:11am UTC](https://forum.kirupa.com/t/on-release-keypress-enter/62000 "2004-08-24T02:11:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![noob123](https://avatars.discourse-cdn.com/v4/letter/n/c2a13f/32.png) [@noob123](https://forum.kirupa.com/u/noob123)\
**Post date:** [August 24, 2004, 2:11am UTC](https://forum.kirupa.com/t/on-release-keypress-enter/62000/1 "2004-08-24T02:11:41Z")

</div>

Here is my problem, I got 2 layers , one has a button and a text box and the second (called movie) has a keyframe in 10 and 20. the button has the code below and it works fine when i put some text in frame 10 and 20 of “movie” layer. the problem is that i want to put a Loader in frame 10 and 20 of the movie layer but when i do the “Enter” key does not work any more. If i click on the button with the mouse it works fine but ckicking Enter with a loader anywhere in the movie breaks the keyPress “\<Enter\>” function. anyone have any ideas???

on(release, keyPress “\<Enter\>”) {  
if (usr == “rooster” || usr == “10”) {  
gotoAndStop(10);  
usr="";  
} else if (usr == “hen” || usr == “20”) {  
gotoAndStop(20);  
usr="";  
} else {  
gotoAndStop(1);  
usr="";  
}  
}

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 24, 2004, 4:18pm UTC](https://forum.kirupa.com/t/on-release-keypress-enter/62000/2 "2004-08-24T16:18:46Z")

</div>

do you have a fla to post? that would be lovely 😉

~ Lacuna :love:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 25, 2004, 4:18am UTC](https://forum.kirupa.com/t/on-release-keypress-enter/62000/3 "2004-08-25T04:18:53Z")

</div>

even though the code is simple enough… objects would be nice to see so that we can see how they operate.
