flash 如何让动态文本框位置移动,必须用脚本实现,因为动态文本框是生成的!

如题 是文本框位置移动,不是里面的文本滚动!
2024-12-13 21:20:33
推荐回答(1个)
回答1:

举例:
tValue = ["123werwerwerwerwerwerr4fdgdgdfdfdfgfd56", "123456", "sdd545454545454545454545454dfr7899", "erewrewreere"];
for (var i = 1; i<5; i++) {
this.createTextField("t"+i, this.getNextHighestDepth(), 40, 100, 60, 22);
this["t"+i].selectable = false;
this["t"+i].multiline = true;
this["t"+i].border = true;
this["t"+i].wordWrap = true;
this["t"+i].autoSize = true;
this["t"+i]._width = 100;
this["t"+i].text = tValue[i-1];
this["t"+i]._x = 40;
if (i == 1) {
this["t"+1]._y = 100;
} else {
this["t"+i]._y = this["t"+(i-1)]._y+this["t"+(i-1)]._height;
}
}