Ver Mensaje Individual
  #19 (permalink)  
Antiguo 02/10/2007, 08:52
Avatar de Mahalo
Mahalo
 
Fecha de Ingreso: julio-2004
Ubicación: Mallorca (Illes Balears)
Mensajes: 1.121
Antigüedad: 19 años, 9 meses
Puntos: 12
Re: Pregunta tonta cargando xml...

Vas a tener que crear un botón. Una vez creado, en la biblioteca haces clic con el botón derecho del ratón y accedes a Vinculación. Ahí marcas "exportar para AS" (o algo así) y le das un identificador de vinculación (por ejemplo "boton").
Código:
datos.onLoad = function(exito) {
	for (i=0; i<datos.firstChild.childNodes.length; i++) {
	loteria.duplicateMovieClip("prueba"+i, i,{_x:100, _y:100+25*i});
	_root["prueba"+i].numero = datos.firstChild.childNodes[i].attributes.numero;
	_root["prueba"+i].tipo = datos.firstChild.childNodes[i].attributes.tipo;

	_root.attachMovie("boton","boton"+i, 100+i, {_x:200,_y:100+25*i});
	_root["boton"].onRelease=function(){
		trace(this._name.substr(5));
	}

	}
};
Con attachMovie creamos una instacia de un clip de película de la biblioteca en el escenario a través de su nombre de vinculación. Ojo con no repetir profundidades (mírate this.getNextHighestDepth()).