I’ve made a class that extends the TextInput object and when I create a new instance of it, I would like to be able to call a function in it’s parent container (another class that extends MovieClip).
I don’t know what I am doing wrong, but trace(this.parent) returns “null”.
Is it possible to determine the parent movieclip in which the textinput resides?
Thanks in advance.
Shortened code example:
// parent
public class FieldRow extends MovieClip {
public function FieldRow() {
// i create an instance of my custom TextInput class
var field:fTextShort = new fTextShort();
addChild(field);
}
}
// child
public class fTextShort extends TextInput {
public function fTextShort() {
trace(this.parent); // returns null
}
}