Mi problema es el siquiente:
Tengo un MC llamda "publichannel" y dentro de éste otro llamado "contenido", es decir, que para acceder a algun objeto que esté dentro de "contenido" tendria que poner: _root.publichannel.contenido.Objeto
Lo que quiero hacer es crear un radio button (el componente correspondiente ya lo tengo en la biblioteca) dentro del MC "contenido" y un campo de texto (ambos de forma dinamica). El codigo (que no me funciona) es el siguiente:
Código ActionScript :
nr=1;
totalrespuestas=vectorrespuestas.length;
y=0;
for (k=0; k<totalrespuestas; k++)
{
textorespuesta = vectorrespuesta[k];
var respuestamc:MovieClip = _root.publichannel.cuerpo.createEmptyMovieClip("respuesta"+nr, _root.publichannel.cuerpo.getNextHighestDepth());
//creo los radiobutton
respuestamc.attachMovie("RadioButton", "rb"+nr,respuestamc.getNextHighestDepth());
respuestamc ["rb"+nr].groupName= "grupopreg-"+idpregunta;
respuestamc ["rb"+nr]["rb"+nr].label = textorespuesta;
respuestamc ["rb"+nr]["rb"+nr].data = nr;
respuestamc["rb"+nr]._x = 0;
respuestamc["rb"+nr]._y = yopcion;
//creo el campo de texto
respuestamc.createTextField("respuestatxt"+nr, respuestamc.getNextHighestDepth(), xr, yr, 300, 100);
respuestamc["respuestaatxt"+nr].multiline = true;
respuestamc["respuestatxt"+nr].wordWrap = true;
respuestamc["respuestatxt"+nr].autoSize = "left";
respuestamc["respuestatxt"+nr].text = textorespuesta;
var formatorespuesta:TextFormat = new TextFormat();
formatorespuesta.color = 0xFFFFFF;
formatorespuesta.size = 12;
formatorespuesta.font = "Arial";
respuestamc["respuestatxt"+nr].setTextFormat(formatorespuesta);
respuestamc["respuestatxt"+nr]._y = yopcion;
respuestamc["respuestatxt"+nr]._x = 30;
yopcion= yopcion + respuestamc._height;
nr ++;
}
Este codigo me creo perfectamente los campos de texto y los posiciona bien, sin embargo no me crea ningun radiobutton.
Alguna de idea del fallo??
Gracias de antemano.
Saludos.
