Are you asking how do you get the text value of the TextInput , or how you set the text value of the TextInput. If it's "how" to get the text input , you have already shown how to do it. You may want to try rephrasing the question at hand.
Try using getDefinitionByName ().
Not clear on what you're asking either. Are you trying to somehow pass id #s for some reason?
Depending on what your goals are, I think either eventing or looping through the children of a container (surrounding the TextInput controls) will do the job.
Here's an example (I didn't test it):
var i:int = 1;
var myTextInput = getDefinitionByName ( "index" + i ) //concatenate the values to get the object by name