# \[FMX04\]Need help with Tab key

**URL:** <https://forum.kirupa.com/t/fmx04-need-help-with-tab-key/260904>\
**Category:** flash\
**Created:** [May 20, 2008, 10:34pm UTC](https://forum.kirupa.com/t/fmx04-need-help-with-tab-key/260904 "2008-05-20T22:34:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lemorris](https://avatars.discourse-cdn.com/v4/letter/l/7ea924/32.png) [@lemorris](https://forum.kirupa.com/u/lemorris)\
**Post date:** [May 20, 2008, 10:34pm UTC](https://forum.kirupa.com/t/fmx04-need-help-with-tab-key/260904/1 "2008-05-20T22:34:09Z")

</div>

I’m having an odd issue with something I’ve done before but for some reason it’s not working now.

I have a movieclip on the root timeline with an input text field in it. I set focus on that textfield and the user is supposed to type something. then when they press the Tab key a button off stage checks to see what text is in the field then goes to another place on the timeline based on what it sees.

I remember it being pretty simple. In fact I have 2 files open. It works in one which is an old file I created years ago, but not in the new file.

Here’s my code on the button

on(keyPress “\<Tab\>”){  
if(epis.text == “fred”){  
gotoAndStop(“fred”);  
}else if(epis.text != “fred”){  
gotoAndStop(“wr1”);  
}  
}

When I run my file it doesn’t do anything. I’ve verified field names and labels but nothing. When I run it using ctrl + enter it just starts hilighting stuff on the stage when I press the tab key.

Once again, the old file works fine.

Can anyone let me know what I’m missing here…I’m kind of in a hurry.

Thank you
