Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/03/2004, 16:43
Sand_drax
 
Fecha de Ingreso: marzo-2002
Ubicación: Guadalajara Jal.
Mensajes: 93
Antigüedad: 22 años, 1 mes
Puntos: 0
problemas con OnRelease

Hola que tal, me podrian ayudar. Lo que pasa es que En este script todo funcion MENOS la parte que le asigno Una Funcion a OnRelease . Cuando lo Ejecuto solo me carga las imagenes pero no me ejecuta la accion de OnRelease.

Le agradezco enormemente su ayuda.
Código:
/******************************************/
var numAnuncios;
var imgPath;
/*******************************************/
var xmlVars = new XML();
xmlVars.ignoreWhite = true;
xmlVars.onLoad = function (sucess) {
	if (sucess) {
		var auxLink;
		var auxImg;
		
		_root.numAnuncios = Number(this.firstChild.attributes.cant);
		_root.imgPath = this.firstChild.attributes.imgPath;
		
		var nodos = this.firstChild.childNodes;
       	for (i = 0; i < nodos.length; i++) {
			//si es anuncio
			if (nodos[i].nodeName == "anuncio") {
				
				//link
				auxLink = nodos[i].attributes.link;
				//imgName
				auxImg = _root.imgPath + nodos[i].attributes.imgName;
				trace(auxImg);
				newAnuncio = "anuncio"+i;
				_root.createEmptyMovieClip(newAnuncio,i);
				_root[newAnuncio].link = auxLink;
				_root[newAnuncio].loadMovie(auxImg);
				_root[newAnuncio].onRelease = function() {
					getURL(this.link);
				} 
			} 
		}
	} else {
		trace("error");
	}
}
xmlVars.load("anuncios.xml");

Última edición por Sand_drax; 06/03/2004 a las 11:02