create an array property textInputs to hold the references to the
dynamically create TextInputs. Then use code like this:

for(var o:uint = 0; o < NumText; o++) 
{
  textInputs[o] = new TextInput();
  textInputs[o].width=356, 
  textInputs[o].text="Text Goes Here";
  someComponent.addChild(textInputs[o]);
}

You can then refer to a particular textInput as textInputs[n]

You need to do the addChild to actually add the TextInputs to the user
interface.

--- In flexcoders@yahoogroups.com, Ary <[EMAIL PROTECTED]> wrote:
>
> hi guys :)
> 
> i know its possible, but i just dont know how ...
> i want to make several text input programmatically,
> number of text input created is based on certain
> variable, and has to be to be unique, need to access
> the component later on.
> 
> here is a chunk of the code (get
> 
> for(var o:uint = 0; o < NumText; o++) 
> {
> curItem = "sTextInput"+ o.toString();
>                                       var this[curItem]:sLabelTextInput = new
> sLabelTextInput();
>                                       sTextInput.id=("txtTemplate"+(o)),
> sTextInput.width=356, sTextInput.text="Text Goes
> Here";
>                                       //sTextInput.setStyle('fontFamily',
> 'Verdana'), sTextInput.setStyle('fontSize', 11);
>                                
>                                
>                                } 
> 
> 
>      
____________________________________________________________________________________
> Looking for last minute shopping deals?  
> Find them fast with Yahoo! Search. 
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
>


Reply via email to