# Accessing textbox

**URL:** <https://forum.kirupa.com/t/accessing-textbox/311204>\
**Category:** Uncategorized\
**Created:** [June 30, 2010, 3:17am UTC](https://forum.kirupa.com/t/accessing-textbox/311204 "2010-06-30T03:17:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![blackout188](https://avatars.discourse-cdn.com/v4/letter/b/dec6dc/32.png) [@blackout188](https://forum.kirupa.com/u/blackout188)\
**Post date:** [June 30, 2010, 3:17am UTC](https://forum.kirupa.com/t/accessing-textbox/311204/1 "2010-06-30T03:17:09Z")

</div>

I have a 2D array that creates a table with value that contain sum of 2 dices. but I want the result of the dice roll display on the appropriate text box on the table. I’m stuck at getting position of textbox which shown at bottom code where I have it as that position as now. selec is the instance name of those textbox. I have attach the source file as well, hopefully someone can help me with this, thank you

```auto
 
var row:int=7;
var colum:int=7;
var dicechar:Array=new Array();
var reddice:int
var whitedice:int
var textboxarray:Array=new Array();
whitedice=Math.random()*6+1
reddice=Math.random()*6+1
 
for(var i:uint=1;i<row;i++){
dicechar*=new Array();
for(var j:uint=1;j<colum;j++){
dicechar*[j]=i+j
textboxarray.push("selec"+i+j)
trace(textboxarray.name)
if(contain("selec"+whitedice+reddice,textboxarray)==1){
textboxarray[that position].text=dicechar[reddice][whitedice]
}
}
}
function contain(input, arrayData) {
for (i=0; i<arrayData.length; i++) {
if (arrayData*==input) {
return 1;
}
}
return -1;
}

```
