# Working with dynamically created instances of Movie Clip

**URL:** https://forum.kirupa.com/t/working-with-dynamically-created-instances-of-movie-clip/199734
**Category:** Uncategorized
**Created:** [September 5, 2006, 3:47pm UTC](https://forum.kirupa.com/t/working-with-dynamically-created-instances-of-movie-clip/199734 "2006-09-05T15:47:26Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![davydany](https://avatars.discourse-cdn.com/v4/letter/d/f6c823/32.png) [@davydany](https://forum.kirupa.com/u/davydany)
#### Post date: [September 5, 2006, 3:47pm UTC](https://forum.kirupa.com/t/working-with-dynamically-created-instances-of-movie-clip/199734/1 "2006-09-05T15:47:26Z")

</div>

i’ve been searching everywhere for this but couldn’t find any help. Someone PLEASE HELP ME!:hair:

```php
for(var i=0; i<row; i++)  
{     
    var u=i+1; 
    attachMovie("friend", "friendName" + u, this.getNextHighestDepth(), {_x:0, _y:ypos}); 
    ypos = ypos + 19;     
}  

```

this code that i have creates this movie clip dynamically and the variable **row** gets its value from a php script. well inside this i have a text field, with instance name **namefield** , which i want to change. usually, we do this:  
\_root.friendName1.namefield.text = “BOB”;  
\_root.friendName2.namefield.text = “Steve”;  
…  
well, how do i do i as refer to dynamically created instance names?
