# Unable to modify a child TextField

**URL:** <https://forum.kirupa.com/t/unable-to-modify-a-child-textfield/253790>\
**Category:** Uncategorized\
**Created:** [March 5, 2008, 4:11am UTC](https://forum.kirupa.com/t/unable-to-modify-a-child-textfield/253790 "2008-03-05T04:11:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![khonfused](https://avatars.discourse-cdn.com/v4/letter/k/46a35a/32.png) [@khonfused](https://forum.kirupa.com/u/khonfused)\
**Post date:** [March 5, 2008, 4:11am UTC](https://forum.kirupa.com/t/unable-to-modify-a-child-textfield/253790/1 "2008-03-05T04:11:46Z")

</div>

Hi,

Okay i know this sounds like a real stupid problem, but i have been trying to figure it out for quite a while and is unable to…

I have a TextField Object added as a child in one of my Classes (which extends MovieClip). After adding it to the class, I am unable to modify the text value of it…

can any one help me out here?

```auto

var myClass:MyClass = new MyClass();
var fmt:TextFormat = new TextFormat();
var tf:TextField = new TextField();

fmt.font = "EmbedFont";
fmt.size = 8;
fmt.color = 0x333333;

tf.embedFont = true;
tf.text = "Lorem";
tf.antiAliasType = AntiAliasType.NORMAL;
tf.type = TextFieldType.DYNAMIC;
tf.autoSize = TextFieldAutoSize.LEFT;
tf.name = "myTxt";

tf.setTextFormat(fmt);

myClass.addChild(tf);
addChild(myClass);

// Somewhere else in the script i havhe this line.. but it just does not WORK!!!! WHY!!!

myClass.getChildByName("myTxt").text = "Ipsum"; 

```
