Tengo Flash MX (casi lloro cuando veo que era propiedad de Macromedia
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)
![lloron](http://static.forosdelweb.com/fdwtheme/images/smilies/chillando.png)
| |||
pues checa este codigo solo ponlo en el primer frame dentro del codigo checa "condenseWhite" ojala sea lo ke andabas buscando var my_str:String = "Hello\tWorld\nHow are you?\t\t\tEnd"; this.createTextField("first_txt", this.getNextHighestDepth(), 10, 10, 160, 120); first_txt.html = true; first_txt.multiline = true; first_txt.wordWrap = true; first_txt.condenseWhite = false; first_txt.border = true; first_txt.htmlText = my_str; this.createTextField("second_txt", this.getNextHighestDepth(), 180, 10, 160, 120); second_txt.html = true; second_txt.multiline = true; second_txt.wordWrap = true; second_txt.condenseWhite = true; second_txt.border = true; second_txt.htmlText = my_str; |
| ||||
Saludos: Investigando más exhaustivamente por la red, encontré la solución ![]() Efectivamente se utiliza la método NO DOCUMENTADO ![]() ![]()
Código:
Y para que vean que funciona muy bien:TextField.prototype.addProperty("text2", function () { return this.text; }, function (txt) { if (!this.condenseWhite) { this.text = txt; return; } for (var i = 0; i<txt.length; i++) { if (txt.charCodeAt(i)>32) { txt = txt.substring(i); break; } } for (var i = 0, t = ""; i<txt.length; i++) { if (txt.charCodeAt(i)>32) { t += txt.charAt(i); } else { if (i != 0 && txt.charCodeAt(i+1)>32) { t += txt.charAt(i); } } } this.text = t; });
Código:
Me sirvió demasiado esto, seguro que a ustedes también tuTextField.condenseWhite = true; tuTextField.text2 = " cadena con muchos espacios inservibles "; trace(tuTextField.text2); ![]()
__________________ GOC00 CominG soOn v2.0 CyA! & GooD LuCK... |
| |||
bueno de echo el metodo ese viene en la ayuda de flash8 en las propiedades del textfield, puedes buscarle si quieres solo presiona F1, creo que es donde debes buscar ahi antes que en cualquier otro lado |