# Setting y property of textfield PROBLEM!

**URL:** <https://forum.kirupa.com/t/setting-y-property-of-textfield-problem/308076>\
**Category:** Uncategorized\
**Created:** [April 16, 2010, 7:36pm UTC](https://forum.kirupa.com/t/setting-y-property-of-textfield-problem/308076 "2010-04-16T19:36:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![m2244](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@m2244](https://forum.kirupa.com/u/m2244)\
**Post date:** [April 16, 2010, 7:36pm UTC](https://forum.kirupa.com/t/setting-y-property-of-textfield-problem/308076/1 "2010-04-16T19:36:25Z")

</div>

I was trying to create these 17 textfields in a for loop. I ended up instanciating them manually and now I am trying to set some of their properties in a for loop. The problem is that when I trace them I just see [object textfield] but not the names. If I try to trace the “.name” I get instance 1, instance 2, etc. The real problem is when I try to set the “y” property I get an error “1010 A term is undefined and has no properties”

Any help would be greatly appreciated, at 3:35, on a Friday, a long Friday.

```auto

var tf1:TextField = new TextField();
var tf2:TextField = new TextField();
var tf3:TextField = new TextField();
var tf4:TextField = new TextField();
var tf5:TextField = new TextField();
var tf6:TextField = new TextField();
var tf7:TextField = new TextField();
var tf8:TextField = new TextField();
var tf9:TextField = new TextField();
var tf10:TextField = new TextField();
var tf11:TextField = new TextField();
var tf12:TextField = new TextField();
var tf13:TextField = new TextField();
var tf14:TextField = new TextField();
var tf15:TextField = new TextField();
var tf16:TextField = new TextField();
var tf17:TextField = new TextField();
tf1.text = string1;
var startHighlight:int = tf1.text.indexOf(mark);
for (var i:uint = 1; i < 18; i++)
{
 this["tf" + i].width = stage.stageWidth;
 this["tf" + i].autoSize = TextFieldAutoSize.LEFT;
 this["tf" + i].x = 0;
 this["tf" + i].height = 31;
 this["tf" + i].width = 675;
 this["tf" + i].multiline = true;
 this.mcContentOnStage.addChild(this["tf"+i]);
 this["tf" + i].setTextFormat(formatNormal);
}
 
this.mcContentOnStage.tf2.y = 100;
this.mcContentOnStage.tf3.y = 133;
this.mcContentOnStage.tf4.y = 177;

```
