# Referring to premade textbox in object

**URL:** <https://forum.kirupa.com/t/referring-to-premade-textbox-in-object/322464>\
**Category:** Uncategorized\
**Created:** [May 22, 2011, 7:46am UTC](https://forum.kirupa.com/t/referring-to-premade-textbox-in-object/322464 "2011-05-22T07:46:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![12abhi12](https://avatars.discourse-cdn.com/v4/letter/1/9f8e36/32.png) [@12abhi12](https://forum.kirupa.com/u/12abhi12)\
**Post date:** [May 22, 2011, 7:46am UTC](https://forum.kirupa.com/t/referring-to-premade-textbox-in-object/322464/1 "2011-05-22T07:46:24Z")

</div>

I have an mc “mc” that I made in flash. It has a text box in it with instance name “txt1”. I dimmed a variable _var mc:MovieClip = new mc()_ and used the add child method to add it to stage. Now I want to refer to the text box in the mc. I tried _mc.getChildByName(txt1).text=“abc”_ but it gives me errors. How do I refer to that text box. Please tell if there is even a way to do so or not.
