# Help with create text field

**URL:** <https://forum.kirupa.com/t/help-with-create-text-field/52024>\
**Category:** Uncategorized\
**Created:** [May 19, 2004, 6:47am UTC](https://forum.kirupa.com/t/help-with-create-text-field/52024 "2004-05-19T06:47:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![radioxromance](https://avatars.discourse-cdn.com/v4/letter/r/9e8a1a/32.png) [@radioxromance](https://forum.kirupa.com/u/radioxromance)\
**Post date:** [May 19, 2004, 6:47am UTC](https://forum.kirupa.com/t/help-with-create-text-field/52024/1 "2004-05-19T06:47:25Z")

</div>

Okay I’m really new to create text field. I am trying to make some text appear (obviously) so I decided to create an object that would execute it and then I could place the text. What’s wrong with it?

```auto

attachText = function(textName, depth, x, y, newWidth, newHeight)	{
	this.textName = textName;
	this.depth = depth;
	this.x = x;
	this.y = y;
	this.newWidth = newWidth;
	this.newHeight = newHeight;
	
	this.textClip = _root.createTextField(this.textName, this.depth, this.x, this.y, this.newWidth, this.newHeight);
};

this.attackText = new attachText("hitAmntText", 150, this.attackWho.clip._x, this.attackWho.clip._y-50, 200, 100);

this.attackText.textClip.text = this.hitAmnt;

```

I am also new to OOP so go easy if it’s way off 😃 Any help, greatly appreciated! thanks
