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