Comunidad de diseño web y desarrollo en internet online

Codigo de boton en codigo complicado

Citar            
MensajeEscrito el 07 Ene 2010 10:34 pm
Como inserto este cidigo en este otro

--------------------------------------------------------------------------------
Ejecuto esta accion desde un boton


Código ActionScript :

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 

// 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>";
}

// 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 por favor gracias

Por drakon

17 de clabLevel



 

msie8
Citar            
MensajeEscrito el 08 Ene 2010 01:51 am
¿Que? ¿Que quieres hacer que?

Por otro lado... NO ES BUENO un LoadVars sobre un botón, JAMÁS

Saludos, Hernán . -

Por Hernán

BOFH

6148 de clabLevel

19 tutoriales
23 articulos

Genero:Masculino   REC Desarrollador de GAIA

Marketing & IT

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.