# Assigning values to the input boxes

**URL:** <https://forum.kirupa.com/t/assigning-values-to-the-input-boxes/260300>\
**Category:** flash\
**Created:** [May 14, 2008, 10:25am UTC](https://forum.kirupa.com/t/assigning-values-to-the-input-boxes/260300 "2008-05-14T10:25:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![arvi\_mca](https://avatars.discourse-cdn.com/v4/letter/a/8c91f0/32.png) [@arvi\_mca](https://forum.kirupa.com/u/arvi_mca)\
**Post date:** [May 14, 2008, 10:25am UTC](https://forum.kirupa.com/t/assigning-values-to-the-input-boxes/260300/1 "2008-05-14T10:25:18Z")

</div>

[COLOR=#ff4080]Hello everybody[/COLOR], I am having one problem with assigning the values to the input boxes. I explain here in detail i.e., i place a input box inside one movieclip. The inputbox is generated using this code

```auto
mcMain.createObject("TextInput", "title_text_tit"+ i, mcMain.getNextHighestDepth(),{_y:90*i+5, _x:200,_width:250,_height:25});

```

In which the name of the textbox is dynamically created by looping this within the for loop. What’s the problem now is, i have to assign the value’s for the inputbox. Being the name of the input box contains the for loops subscript value ‘i’ . I use the following code to assign the values for the input boxes.

```auto
"_root.mcMain.title_text"+i+"_tit" = "hi"; 

```

Here, mcMain is the movieclip and title\_text+i+ is the name of the inputbox i value is replaced by 0,1 and so on, when it will loops inside the for loop.  
We are using the + symbol in the left side of the assignment part. so it shows the error. i try many more combinations like assigning the

```auto
sample_text=_root.mcMain.title_text"+i+";

```

but it won’t work when i assign like

```auto
sample_text.text= "hi"

```

Please help me how to assign the values for the input boxes using the for loop value “i” being the part of the left side in the assignment section.:sen:
