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”);
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?