# Autosize not working on dynamically added textfield?

**URL:** <https://forum.kirupa.com/t/autosize-not-working-on-dynamically-added-textfield/318471>\
**Category:** Uncategorized\
**Created:** [January 21, 2011, 1:38am UTC](https://forum.kirupa.com/t/autosize-not-working-on-dynamically-added-textfield/318471 "2011-01-21T01:38:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![azukizero](https://avatars.discourse-cdn.com/v4/letter/a/74df32/32.png) [@azukizero](https://forum.kirupa.com/u/azukizero)\
**Post date:** [January 21, 2011, 1:38am UTC](https://forum.kirupa.com/t/autosize-not-working-on-dynamically-added-textfield/318471/1 "2011-01-21T01:38:19Z")

</div>

I have a masked textbox which is also dynamically added to the stage from the library, and I’d like it to resize according to the amount of text loaded into it.

this isn’t working:

```auto

contentBox.container_mc.contentTxt_mc.autoSize = TextFieldAutoSize.LEFT;

```

Unfortunately I’m getting error:1120 but I’ve checked and rechecked every instance name so this error doesn’t make much sense…

what am I missing?

help please!
