/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var prevText:String; inputfield.addEventListener(Event.CHANGE, onUpdate); private function onUpdate(e:Event):void { if (inputfield.textHeight > inputfield.height) inputfield.text = prevText; else prevText= inputfield.text; }