You need to cast it to the type of object you want to operate on:

var test:TextBox = this.getChildByName("inputtext" + 1) as TextBox;

or

var test:TextBox = TextBox(this.getChildByName("inputtext" + 1));

The first form will return null if it cannot cast the displayObject to  
that type as opposed to the second which will cause an error.

Of course the Eclipse help system is so utterly useless that searching  
for 'as' will return nothing and displayObject will not be in the  
first 3 items you search for.

Regards,
Nik

Reply via email to