我正在尝试TextField
在 ActionScript 3 中动态创建一个。下面的代码绘制了文本框本身(在本例中只是一个红色矩形),但"Add text here"
不显示字符串。我能做些什么来解决这个问题?
var d:Number = mc.getNextHighestDepth();
var x:Number = (screenWidth - boxWidth) / 2;
var y:Number = (screenHeight - boxHeight) / 2;
var w:Number = boxWidth;
var h:Number = boxHeight;
notification = mc.createTextField("Text", d, x, y, w, h);
notification.background = true;
notification.backgroundColor = 0xFF0000;
notification.selectable = false;
notification.wordWrap = true;
notification.text = "Add text here";