# On(keyPress) ISSUES!

**URL:** <https://forum.kirupa.com/t/on-keypress-issues/104524>\
**Category:** Uncategorized\
**Created:** [March 17, 2004, 2:29am UTC](https://forum.kirupa.com/t/on-keypress-issues/104524 "2004-03-17T02:29:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![blackpulp](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/blackpulp/32/81_2.png) [@blackpulp](https://forum.kirupa.com/u/blackpulp)\
**Post date:** [March 17, 2004, 2:29am UTC](https://forum.kirupa.com/t/on-keypress-issues/104524/1 "2004-03-17T02:29:10Z")

</div>

ok, so I am trying to make it possible for when a user is done typing in a textbox for them to be able to just press enter and have a series of actions run and then they are taken to the next page or something…

so heres what ive got.

these actions are on my button.

on(keyPress “\<ENTER\>”){  
trace(“got it”);  
domainN = domain\_name.text;  
if(domainN.indexOf(“www.”) \> -1){  
domainN = domainN.slice(4);  
}  
li = domainN.indexOf(".");  
if(li \> -1){  
domainN = domainN.slice(0, li);  
}  
\_global.processDomain(domainN, this.tld.text);  
}  
on(release){  
domainN = domain\_name.text;  
if(domainN.indexOf(“www.”) \> -1){  
domainN = domainN.slice(4);  
}  
li = domainN.indexOf(".");  
if(li \> -1){  
domainN = domainN.slice(0, li);  
}  
\_global.processDomain(domainN, this.tld.text);  
}

however, this is not working…i have also tried to to disable the shortcut keys in flash…no luck…any help would be much appreciated…

blessings  
travis

---

<div class="post-metadata">

**Author:** ![Sim085](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@Sim085](https://forum.kirupa.com/u/Sim085)\
**Post date:** [August 10, 2004, 1:28pm UTC](https://forum.kirupa.com/t/on-keypress-issues/104524/2 "2004-08-10T13:28:32Z")

</div>

I also have the same problem and can’t understand why it is not working the inKeyPress method!!
