myT.text = replacer(this.text); function replacer():String{ var _l1:String = arguments[0]; _l1=_l1.split("\r").join(""); return _l1; }