# Referring to a duplicated Movie Clip Help!

**URL:** https://forum.kirupa.com/t/referring-to-a-duplicated-movie-clip-help/306526
**Category:** flash
**Created:** [March 16, 2010, 11:58pm UTC](https://forum.kirupa.com/t/referring-to-a-duplicated-movie-clip-help/306526 "2010-03-16T23:58:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Whitnemp](https://avatars.discourse-cdn.com/v4/letter/w/5fc32e/32.png) [@Whitnemp](https://forum.kirupa.com/u/Whitnemp)
#### Post date: [March 16, 2010, 11:58pm UTC](https://forum.kirupa.com/t/referring-to-a-duplicated-movie-clip-help/306526/1 "2010-03-16T23:58:04Z")

</div>

for (i=1; i\<10; i++) {  
nameMC.duplicateMovieClip(“nameMC”+i, i, {\_y:+position});  
var position = position +150

var myXML:XML = new XML();  
myXML.ignoreWhite = true;  
myXML.load(“[http://www.url.com/portfolioupdates.php](http://www.url.com/portfolioupdates.php)”);  
myXML.onLoad = function() {  
var nodes = this.firstChild.childNodes

```
clientname = this.firstChild.childNodes[(nodes.length-i)].firstChild.nodeValue;
nameMC*.nametext.text = clientname;

```

}

Hey guys. I’m having trouble referring to a duplicated movie clip, i just don’t know the syntax. Above is the code to try and accomplish the following:

List some elements from a external mySQL database.

However, the: [COLOR=“Red”]nameMC\*[/COLOR].nametext.text = clientname; seems to not be working. I think it’s because I don’t know how to refer to the new movieclip that was created.

The variable _clientname_ should be changing every time the loop cycles, and the duplicated movieclip has a dynamic text field that outputs the _clientname_ variable. However, I cant seem to get flash to identify that dynamic text box. And yes, I have all my instance names right, because if I replace \* with 1 or any other number through 10, then the duplicated movie clip called nameMC1 or whichever number i choose will display the variable correctly.

Any thoughts?
