Can anyone tell me what I'm doing wrong? Working with Flash MX, I have a movie clip (instance of btn_mc) that serves as a button. It reads from a text file (names.txt) for the values to display on the MC button. I'm trying to make the movie clip duplicate by the button height for each value in the text file. It seems to duplicate but it looks like they stack on top of each other and no values display from the text file. The following is the code I've written:
--------------------------------------------------
btn_mc._visible=false;
nameData = new LoadVars();
nameData.load("names.txt");
nameData.onLoad = function()
{
nameArray = this.names.split(",");
numItems = nameArray.length
for(var i=0;i<numItems;i++);
{
btn_mc.duplicateMovieClip("button"+i,i+1);
thisClip = _root["button"+i];
if(i>0)
{
lastClip=_root["button"+(i-1)];
thisClip._y = lastClip._y + lastClip.height;
thisClip.name_text.textnameArray[i];
}
}
--------------------------------------------------
Thanks for any help,
Scott
Bookmarks