Creating button list

hey, i’m trying to create a list by duplicating buttons, and then when these buttons are clicked, they load a movie

so far here’s my script in a frame
[AS]
text1 = “link1”;
text2 = “link2”;
text3 = “link3”;

amount = 3;
while (amount>0) {
duplicateMovieClip (_root.button, “button”+i, i);
setProperty (“button”+i, _y, _root.button._y+113);
newb = “button”+i;
_root.newb.link.text = “text”+i;
}
i++;
amount–;
}
[/AS]
113 - height of a button
link - dynamic text field inside a button

however this doesn’t work too well, the position of new buttons dont really go where they are supposed to go (which should be directly under each other). neither does the entering of the text in the new button work. :-\

anyone can help me? i think it’d be better if you’ll just scrap my script and start afresh, i’m still rather new at scripting :stuck_out_tongue:

the button clips are MCs with button events aren’t they? Because if they’re just buttons then it shouldn’t do anything.

Can you post your .fla? if you can i’ll take a shot at it.

i think when you use setProperty (“button”+i, _y, _root.button._y+113);

then the movie gets duplicated constantly on to one location. Try using,

_root[“button”+i]._y=_root.button._y +(113*i)

i think that should work

thx kartik, that worked

however, i still can’t get the text part rite :-\
i’ve made some changes to the script/movie clips, here’s the fla

thx for the help

forgeddit guys, i fixed it :wink:
what i did wrong was i gave the textbox an instance name instead of a variable

Ok…i did get it all fixed…except for 1 more problem. Now when i load it into another movie, the movieclips do not duplicate. i think that the events under the while() function are not taking place. however, still can’t find the solution:*(

attached is the new fla