TLFTextField text property not accessible in constructor

190 Views Asked by At

I've placed TLFTextField in a MovieClip with some default text, MovieClip is assigned a class,

In the constructor,

trace(first_name, first_name.text); //textField is available but not the default text

however default text is available inside another function a bit later, I need the default text to be available inside constructor to do some validations stuff

(like for instance if field is empty, get the default text back on focus out event)

1

There are 1 best solutions below

0
On

got it, TLFTextFields are only available once added to the stage, did my work in stageaddedhandler.