# Check input text

**URL:** <https://forum.kirupa.com/t/check-input-text/314324>\
**Category:** Uncategorized\
**Created:** [September 24, 2010, 5:17pm UTC](https://forum.kirupa.com/t/check-input-text/314324 "2010-09-24T17:17:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jac4b](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@jac4b](https://forum.kirupa.com/u/jac4b)\
**Post date:** [September 24, 2010, 5:17pm UTC](https://forum.kirupa.com/t/check-input-text/314324/1 "2010-09-24T17:17:45Z")

</div>

Hi, I’m trying to make it so that when a user inputs the correct word an event happens. It almost works except that the event doesn’t fire until the NEXT keystroke. Is there a way to test for the word AFTER the keystroke has become part of WriteInOneText.text, without adding a separate button or anything? Thanks!!!

Here’s the code:

```auto
WriteInOneText.addEventListener(KeyboardEvent.KEY_DOWN, fl_KeyboardDownHandler);

function fl_KeyboardDownHandler(event:KeyboardEvent):void
{
    if (WriteInOneText.text == "SOMETHING"){
    trace("yay!")
    }
}

```
