I cannot figured a simple problem with handling dynamic text field in flash. I do not have brain cells anymore and im giving up..
var g = ['text dang', 'text deng', 'dong', 'laah', 'maah'];
for(var q = 0; q < g.length; q++){
var p = new grad_plate();
p.name_field.multiline = false;
p.name_field.wordWrap = false;
p.name_field.autoSize = TextFieldAutoSize.LEFT;
p.name_field.text = g[q];
p.name_field.width = p.name_field.textWidth;
p.plate_mc.width = p.name_field.width + 20;
p.width = p.plate_mc.width;
p.name = "name_" + q;
stage.addChild(p);
//p.x = q * stage.getChildAt(q).width;
//p.x = q * p.width;
p.x = q * 200;
}
my grad_plate() class contains name_field textfield and plate_mc for the background.
I want to dynamically set the x of each of the instance depending instance`s width.
giving 200 (fix) is working but I want to dynamically get the p.width which gives me an ugly horizontal align.
