Trying to loop a movie clip with different dynamic text values

Hi there,
Hope someone out there can help! I’m fairly new to actionscripting, though I can program in Javascript, ASP and PHP pretty well. I’m having some trouble with this basic task and it’s a roadblock for me!

I have an empty movie clip that I load as a “container.” What I want to do is loop through an array that has some text values, and each time I want to do 3 things:

  1. load a generic movie clip from my library (which has a dynamic text field) into the empty movie clip container
  2. assign the text value to the dynamic text field
  3. remove the generic movie clip

here is the code I have:

name_text_array = [“First Name”,“Second Name”,“Third Name”];
_root.createEmptyMovieClip(“my_mc”,1);
my_mc._x = 200;
my_mc._y = 200;

for (i=0;i<name_text_array.length;i++) {
my_mc.attachMovie(“nameclip”,“nameclip_mc”,1);
my_mc.nameclip_mc.name_text.text = name_text_array*;
removeMovieClip(“nameclip_mc”);
}

obviously this doesn’t work - what happens is that I get one iteration of the loop with the last value “Third Name” only displayed. I put a trace in the loop, and it does spit out all the text values correctly so I know the loop itself is iterating properly.

So in short what I want to happen is I want to see the movie clip 3 times, displaying each of the sequential array items.

I seem to be missing something! Please help!

thanks in advance!