redshark
11-07-2003, 05:27 PM
I want to make serveral text boxes the correct way is createTextField, but I donīt know the number cause it is a variable. I'm using an array for getting this number
nom_array = new Array(city,city1,city2,city3,city4,city5,city6,cit y7);
var m = nom_array.length + 1;
for (i = 0; i < m; i++){
if (i < m - 1){
mytext1 = "mytext1"+i;
createTextField(mytext1, (i+1), sxpos + 10, sypos, 100, 20);
mytext1.multiline = true;
mytext1.wordWrap = true;
mytext1.autoSize = true;
mytext1.border = true;
myformat = new TextFormat();
myformat.selectable=false;
myformat.color = 0xff0000;
myformat.font = "Verdana";
mytext1.text = city;
mytext1.setTextFormat(myformat);
}
else
stop();
}
I've read all the posts end I still canīt find why i doesnīt work. Also the mytext1.autoSize isnīt working.
Thanks very much in advanced
nom_array = new Array(city,city1,city2,city3,city4,city5,city6,cit y7);
var m = nom_array.length + 1;
for (i = 0; i < m; i++){
if (i < m - 1){
mytext1 = "mytext1"+i;
createTextField(mytext1, (i+1), sxpos + 10, sypos, 100, 20);
mytext1.multiline = true;
mytext1.wordWrap = true;
mytext1.autoSize = true;
mytext1.border = true;
myformat = new TextFormat();
myformat.selectable=false;
myformat.color = 0xff0000;
myformat.font = "Verdana";
mytext1.text = city;
mytext1.setTextFormat(myformat);
}
else
stop();
}
I've read all the posts end I still canīt find why i doesnīt work. Also the mytext1.autoSize isnīt working.
Thanks very much in advanced