# Help on create textField inside MCs and

**URL:** <https://forum.kirupa.com/t/help-on-create-textfield-inside-mcs-and/290672>\
**Category:** flash\
**Created:** [June 18, 2009, 4:27am UTC](https://forum.kirupa.com/t/help-on-create-textfield-inside-mcs-and/290672 "2009-06-18T04:27:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![derekzxy](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@derekzxy](https://forum.kirupa.com/u/derekzxy)\
**Post date:** [June 18, 2009, 4:27am UTC](https://forum.kirupa.com/t/help-on-create-textfield-inside-mcs-and/290672/1 "2009-06-18T04:27:31Z")

</div>

Hi There,  
Im trying to create same MCs and create a textField inside each MC created, then I am trying to apply onRollOver event into those MCs created and change the textField.textColor.  
From my code Im resulting and trace with “undefined” how can I manipulate the dynamic created Textfield inside the dynamic created MC  
Here is my code:  
for (var i = 101; i \< 103; i++)  
{  
if ( i != 115 and i != 116 or i != 126 or i != 127 or i != 134)  
{  
text\_link\_y = text\_link\_y + 20;  
var text\_mc:MovieClip = this.createEmptyMovieClip(“shop\_link\_mc\_” + i, this.getNextHighestDepth(), 540, text\_link\_y, 150, 20);  
var text\_link:TextField = this[“shop\_link\_mc\_” + i].createTextField(“shop\_link\_” + i, this.getNextHighestDepth(), 540, text\_link\_y, 150, 20);  
text\_link.text = “shop\_” + i;  
text\_link.textColor = 0xD0D0D0;  
var txtFormat = new TextFormat();  
txtFormat.font = “Arial”;  
txtFormat.size = 12;  
text\_link.setTextFormat(txtFormat);  
this[“shop\_link\_mc\_” + i].onRollOver = function()  
{  
this[“shop\_link\_” + i].textColor = 0xFF9900;  
}  
this[“shop\_link\_mc\_” + i].onRollOut = function()  
{  
this[“shop\_link\_” + i].textColor = 0xD0D0D0;  
trace(this[“shop\_link\_” + i].textColor);  
}  
}  
}  
Thanks in advance
