hi guys, im hoping u can shed some light on the subject.
im trying to build some buttons and text fields on the fly. which to be honest i should be able to do based on your walk throughs(which i have to say, have helped me alot in the past so cheers :thumb2:)
the problem is, is that i am trying to make the textfield text represent what is in an array position…dont know if i have explained that properly but here is my code, hopefully it will explain what it is im trying to do
for(i=1;i<8;i++){
var bcoordinates = bpos*;
var bname = array*;
trace(bname);
_root.createEmptyMovieClip("button"+i, 100+i);
_root["button"+i].lineStyle(0, 0x820F26, 60, true, "none", "square", "round");
_root["button"+i].beginFill(0xFF0000, 100);
_root["button"+i].lineTo(120, 0);
_root["button"+i].lineTo(120, 30);
_root["button"+i].lineTo(0, 30);
_root["button"+i].lineTo(0, 0);
_root["button"+i].endFill(-25, -10);
_root["button"+i]._x = 55;
_root["button"+i]._y = bcoordinates;
_root.createTextField("button"+i, 1, 0, 5, button.width, 24);
_root["button"+i].text = bname;
}
just to clear some things up, bpos is an array containing y co-ordinates, array is an array that contains the text that i want to put into the textfield. setting the y co-ordinates works a dream, but setting the text to go in the field doesnt and the array contains the text because i have traced it(as u can tell).
as u can tell it isnt very fancy code and it doesnt doo too much but it would be much appreciated if anyone were to be able to help.