Quiero centrar verticalmente un texto dinamico que me llega desde XML. L estoy ententando asi pero no me sale:
copy4.mensaje es mi texto dinamico
Código ActionScript :
private var init_height:Number;
...
init_height= copy4.mensaje.height;
copy4.mensaje.autoSize = "center";
if(copy4.mensaje.height>init_height){
copy4.mensaje.y = copy4.mensaje.y-((copy4.mensaje.height-init_height)/2);
}
Eso necesito llamarlo dentro de esta funcion
Código ActionScript :
private function showAnswer() {
anterior = _randomNum;
switch (seleccion) {
case "amor" :
//trace(" anterior "+anterior+" _randomNum "+_randomNum);
randRange(0, (xml.amor.length())-1);
if (anterior == _randomNum) {
randRange(0, (xml.amor.length())-1);
} else {
//trace(_randomNum);
//trace(questSalud);
copy4.mensaje.text = questAmor[_randomNum];
frase = questAmor[_randomNum];
}
break;
.......
Gracias por la ayuda chicos, se que estoy cerca, falta algo tonto
