Check input text

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:

WriteInOneText.addEventListener(KeyboardEvent.KEY_DOWN, fl_KeyboardDownHandler);

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