# This.text\[i\].text = i; Syntax Help

**URL:** <https://forum.kirupa.com/t/this-text-i-text-i-syntax-help/207069>\
**Category:** Uncategorized\
**Created:** [November 14, 2006, 3:38pm UTC](https://forum.kirupa.com/t/this-text-i-text-i-syntax-help/207069 "2006-11-14T15:38:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tom\_jones](https://avatars.discourse-cdn.com/v4/letter/t/7feea3/32.png) [@tom\_jones](https://forum.kirupa.com/u/tom_jones)\
**Post date:** [November 14, 2006, 3:38pm UTC](https://forum.kirupa.com/t/this-text-i-text-i-syntax-help/207069/1 "2006-11-14T15:38:31Z")

</div>

i created 2 text fields on the stage, and named them text1 and text2.

I then create a for loop which counts 1 to 2.

Finally, I have a command which should write “i” to each available field , however I am having problems with the dynamic targeting. Can someone tell me what i am doing wrong.

the code is as follows:

```auto

	for (i = 1; i < 3; i++) {
	trace(i); 
	this.text*.text = i;
	
}

```

Thanks for your assistance.
