PDA

View Full Version : can someone explain eventListener ... having issues



cry4dawn
September 15th, 2009, 05:00 PM
Here is my issue.



txtQty.addEventListener(TextEvent.TEXT_INPUT, textChange);

public function textChange(event:TextEvent):void
{
trace("text changed " + txtQty.text);
}


The problem is that when the user types in the text only the character up to but NOT INCLUDING the last character is being seen. So if I have '12' in my text box and type '3' instead of '123' the value is only reading '12' and so on. Am I listening to the wrong event? How do I listen for AFTER the text is in there?

cry4dawn
September 15th, 2009, 05:05 PM
I got it to work using Event.CHANGE instead, guess that was it.