hsadan
June 28th, 2003, 09:45 AM
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
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--;
}
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 :P
so far here's my script in a frame
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--;
}
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 :P