I am trying to set up a listener when the user changes the text in a text box.
I’ve tried:
myTextField.addEventListener(TextEvent.TEXT_INPUT, textChange);
public function textChange(event:TextEvent):void
{
trace("text changed");
}
as well as:
myTextField.addEventListener(Event.CHANGE, textChange);
public function textChange(event:Event):void
{
trace("text changed");
}
When I attempt to compile either way I get:
‘1046: Type was not found or was not a compile-time constant: TextEvent.’
I’ve got import fl.events.*; so what else am I missing to make this work? Any help would be appreciated.