Hi everyone!
I hope you can help me with this. I’m working on Flash 8, btw.
I have a dynamic textfield where I load external XML and CSS stylesheet. I want the textfield to automatically resize when another XML is loaded into it, and I know the common thing is seting the textfield to autoSize=“left”, but it’s not working for me, and I don’t know why. wordWrap is also set to true.
The problem is that the textfield DOES resize, BUT as if no text had been loaded (the height of the textfield turns to 10 pixels or so). I checked timeline problems and stuff but everything seems ok…
Here’s my code (where I load the XML and CSS in the textfield)
//set text properties.
todocursos.texto.cursotexto.html = true;
todocursos.texto.cursotexto.autoSize= true;
todocursos.texto.cursotexto.wordWrap = true;
todocursos.texto.cursotexto.multiline = true;
todocursos.texto.cursotexto.label.condenseWhite = true;
//Style.
textoStyle = new TextField.StyleSheet();
textoStyle.load("datos/style.css");
todocursos.texto.cursotexto.styleSheet = textoStyle;
//xml UNO
_global.textouno = new XML();
_global.textouno.ignoreWhite = true;
_global.textouno.onLoad = function(exito) {
if (exito) {
trace("ok");
todocursos.texto.cursotexto.text = _global.textouno;
} else {
trace("not ok");
}
};
_global.textouno.load("datos/3dgral.xml");
Thanks in advance!