Con este sencillo prototipo eliminamos los molestos y habituales dobles retornos de carro de un archivo de texto externo cargado dinámicamente.
Actionscript:
String.prototype.cleanReturns = function() {
return this.split("\n\r").join("\n");
};
//Uso:
textbox.text = this.txt.cleanReturns();
return this.split("\n\r").join("\n");
};
//Uso:
textbox.text = this.txt.cleanReturns();
