Hi,
I have a class that makes a textArea and a textInput on my stage. I have setup my EventListener in my class. It accurately triggers the change function when the user types in either component.
What I would like to do is run an update function based on which component they typed in. But first I can’t figure out which component triggered the listener.
Any help is appreciated. Currently the trace returns undefined
titlename = txt_mc.createClassObject(TextInput, "titlename", 2);
titlename.setSize(200, 25);
titlename.move(txt_mc._x, txt_mc._y);
titlename.editable = true;
titlename.text = "This is your Title";
titlename.addEventListener("change", txtListener);
description = txt_mc.createClassObject(TextArea,"description", 3);
description.setSize(200, 100);
description.move(txt_mc._x, txt_mc._y+30);
description.editable = true;
description.text = "This is your description";
description.addEventListener("change", txtListener);
txtListener.change = function(textfield_txt:TextField) {
trace(textfield_txt._name);
};