# Moving to next frame based on 1 letter typed in a text field

**URL:** <https://forum.kirupa.com/t/moving-to-next-frame-based-on-1-letter-typed-in-a-text-field/438452>\
**Category:** flash\
**Created:** [December 18, 2014, 4:50pm UTC](https://forum.kirupa.com/t/moving-to-next-frame-based-on-1-letter-typed-in-a-text-field/438452 "2014-12-18T16:50:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rhanna2](https://avatars.discourse-cdn.com/v4/letter/r/c89c15/32.png) [@rhanna2](https://forum.kirupa.com/u/rhanna2)\
**Post date:** [December 18, 2014, 4:50pm UTC](https://forum.kirupa.com/t/moving-to-next-frame-based-on-1-letter-typed-in-a-text-field/438452/1 "2014-12-18T16:50:53Z")

</div>

Hello, I have a text field that will change display based on what is typed in the field, very similar to a drop-down menu.

What I need to know, is how can I have it navigate to the next frame if there is no action other than typing the correct letter in the field other than onChanged? Here’s my code;

> keyword\_txt.addEventListener(Event.CHANGE, textChanged);

> function textChanged(e:Event)

> {

> ```
> var a = keyword_txt.text;
> 
> ```

> ```
> {
> 
> ```

> ```
> if (a == "D")
> 
> ```

> ```
> {
> 
> ```

> ```
> gotoAndPlay("rbms_04-2");
> 
> ```

> ```
> }
> 
> ```

> ```
> else if (a != "D")
> 
> ```

> ```
> {
> 
> ```

> ```
> keyword_txt.textColor = 0xFF0000;
> 
> ```

> ```
> incorrect_mc.wrong_txt.text = "The correct first letter of the Diamond keyword is D. Please type a D in this field to continue.";
> 
> ```

> ```
> }}
> 
> ```

> }
