cardiac7
12-06-2004, 10:35 PM
Ok.... So i have this string that I am splitting up into an array, now I need to loop through that array and create/duplicate a MC for each [i] in that array. So far I have this, but its not making new MC's?
// Where "brand" is my array.... and "brandMC" is the MC I want duplicated
for (i in brand) {
xPos +=20;
yPos +=20;
brandMC.duplicateMovieClip("brand"+i, this.getNextHighestDepth(), {_x:xPos, _y:yPos});
trace(brand[i]);
}
///end array loop
But nothing happens???? The only thing I have in the brandMC is a dynamic textfield that I will need to figure out how to populate with the brand[i].value.
Any suggestions? Ultimately I am going to have them randomly move about the stage.
Thanks AS!
// Where "brand" is my array.... and "brandMC" is the MC I want duplicated
for (i in brand) {
xPos +=20;
yPos +=20;
brandMC.duplicateMovieClip("brand"+i, this.getNextHighestDepth(), {_x:xPos, _y:yPos});
trace(brand[i]);
}
///end array loop
But nothing happens???? The only thing I have in the brandMC is a dynamic textfield that I will need to figure out how to populate with the brand[i].value.
Any suggestions? Ultimately I am going to have them randomly move about the stage.
Thanks AS!