Monica 就是简单的new一个TextArea加到舞台上啊。。。。。(不要使用TextArea.tex = “aaaaaaaa”这种形式,直接靠键盘输入),具体涉及到的代码如下:
public var txtInput:TextArea;
txtInput.vScrollBarSkin = GameConfig.UI_ROOT + "vscroll.png";
txtInput.vScrollBar.autoHide = true;
txtInput.vScrollBar.mouseWheelEnable = true;
txtInput.multiline = true;//使用ide设置的
txtInput.wordWrap = true;//使用ide设置的
txtInput.on(Event.INPUT, this, onInputChange);
private function reset(e:Event = null):void {
clickStar = 0;
txtInput.text = "";
txtLast.text = "剩余输入:" + WelfareNoticeMgr.MAX_WARD + "字";
}
private function onInputChange(e:Event):void {
txtLast.text = "剩余输入:" + (WelfareNoticeMgr.MAX_WARD - txtInput.text.length) + "字";
}