Foros del Web » Creando para Internet » Flash y Actionscript »

Como inserto este codigo en este otro

Estas en el tema de Como inserto este codigo en este otro en el foro de Flash y Actionscript en Foros del Web. Ejecuto esta accion desde un boton Código: on (press) { var LVLoadVars = new LoadVars() LV.onLoad = function(){ contenedor1.loadMovie(this.a1); contenedor2.loadMovie(this.a2); contenedor3.loadMovie(this.a3); contenedor4.loadMovie(this.a4); } LV.load(variables.txt); } ...
  #1 (permalink)  
Antiguo 07/01/2010, 16:29
 
Fecha de Ingreso: octubre-2007
Mensajes: 61
Antigüedad: 16 años, 6 meses
Puntos: 0
Como inserto este codigo en este otro

Ejecuto esta accion desde un boton

Código:
on (press) {
		var LVLoadVars = new LoadVars()
	LV.onLoad = function(){
	contenedor1.loadMovie(this.a1);
	contenedor2.loadMovie(this.a2);
	contenedor3.loadMovie(this.a3);
	contenedor4.loadMovie(this.a4);
	}
	LV.load(variables.txt);
}
como puedo hacer que funcione en este otro codigo
Código:
// declaración de variables a utilizar
inicioX=45;
inicioY=125;
separacionVertical=25;

XML.prototype.ignoreWhite=true;

// función que mostrará los detalles de cada usuario en el campo de texto de la derecha
mostrarDetalle=function(id){
	var datos_usuario=datos_bd.firstChild.childNodes[id];
	detalles.htmlText="";
	detalles.htmlText+="<b>id: </b>"+datos_usuario.attributes.id+"<br>";
	detalles.htmlText+="<b>Apellido Paterno: </b>"+datos_usuario.attributes.nombre +" "+datos_usuario.attributes.apellido+"";
	detalles.htmlText+="<b>Apellido Materno: </b>"+datos_usuario.attributes.nick+"<br>";
	detalles.htmlText+="<b>Nombre 1 : </b>"+datos_usuario.attributes.autor+"<br>";
	detalles.htmlText+="<b>Nombre 2 : </b>"+datos_usuario.attributes.nacionalidad+"<br> <br>";
	detalles.htmlText+="<b>Año de Nacimiento: </b>"+datos_usuario.attributes.nacimiento+"<br>";
	detalles.htmlText+="<b>Descripcion Rapida: </b>"+datos_usuario.attributes.descripcion+"<br>";
	detalles.htmlText+="<b>Genero: </b>"+datos_usuario.attributes.genero+"<br>";	
	detalles.htmlText+="<b>Comentarios Autor : </b>"+datos_usuario.attributes.obs1+"<br>";	
	detalles.htmlText+="<b>Puntuacion: </b>"+datos_usuario.attributes.puntos+"<br>";	
	detalles.htmlText+="<b>Votos: </b>"+datos_usuario.attributes.votos+"<br>";	
	detalles.htmlText+="<b>Email: </b><u><a href=\"mailto:"+datos_usuario.attributes.email+"\">"+datos_usuario.attributes.email+"</a></u><br>";
	detalles.htmlText+="<b>Web Site: </b><u><a href=\""+datos_usuario.attributes.url+"\" target=\"_blank\">"+datos_usuario.attributes.url+"</a></u><br>";

********// quiero que funcione justo aquio

}

// objeto XML que recibe el listado de usuarios
datos_bd=new XML();

// función que procesa la información del listado de usuarios
datos_bd.onLoad=function(exito){
	if(exito){
		var raiz=this.firstChild;
		var hijos=this.firstChild.childNodes.length;
		for(var n=0;n<hijos;n++){
			var nom=_root.attachMovie("nombre","nombre"+n,n+1,{_x:inicioX,_y:inicioY+(separacionVertical*n)});
			nom.nick.text=raiz.childNodes[n].attributes.nick;
			nom.id=n;
			nom.onRelease = function (){
				this._parent.mostrarDetalle(this.id);
			}				
		}
		detalles.htmlText="Elija un usuario en el menú de la izquierda.";
	}else{
		detalles.htmlText="<b>Error al cargar los datos</b>";
	}
}

// acceso al documento XML que contiene el listado de usuarios
datos_bd.load("directorio.xml?rn=" + new Date().getTime());
Alguien me ayuda gracias

Última edición por drakon; 07/01/2010 a las 18:14

Etiquetas: Ninguno
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 07:09.