var inicioX:Number = 0;
var inicioY:Number = 20;
var separacionVertical:Number = 30;
var y:Number = 300;
mostrarDetalle = function (exito:Boolean) {
if (exito) {
if (this.output == "ok") {
detalles.htmlText = "";
detalles.htmlText = "<font color='#444444' size='12' weigth='bold'>"+this.nombre+"</font><br>";
detalles.htmlText += "<font color='#444444'>"+this.fecha+"</font><br><br>";
foto.loadMovie("subirDB/fotografiasnoticias/"+this.imagen);
detalles.htmlText += "<font color='#444444'>Descrpcion:<br></font> "+this.descripcion+"<br>";
foto._alpha = 100;
} else {
detalles.htmlText = "Se produjo el siguiente error: <b>"+this.msg+"</b>";
}
} else {
detalles.htmlText = "Error al cargar los datos del usuario";
}
};
obtenerDetalle = function (id_ficha:Number) {
var detalle_usuario:LoadVars = new LoadVars();
detalle_usuario.hacer = "datos";
detalle_usuario.id_ficha = id_ficha;
detalle_usuario.onLoad = mostrarDetalle;
detalle_usuario.sendAndLoad("http://localhost/juan/loadcopia.php", detalle_usuario, "POST");
};
var datos_bd:LoadVars = new LoadVars();
datos_bd.hacer = "todos";
datos_bd.onLoad = function(exito) {
if (exito) {
if (this.output == "ok") {
this.total = parseInt(this.total);
for (var n = 1; n<this.total+1; n++) {
var nom = attachMovie("nombre", "descripcion"+n, n+1, {_x:inicioX, _y:inicioY+(separacionVertical*(n-1))});
nom.caja_txtcuatro.text = this["nombre"+n];
nom.id_ficha = this["id_ficha"+n];
nom.onRelease = function() {
this._parent.obtenerDetalle(this.id_ficha);
//AQUI IRIA LA FUNCION PERO NO SE CUAL ES, TODO LO DEMAS FUNCIONA
}
nom.onRollOver = function() {
this.gotoAndPlay("on");
};
nom.onRollOut = function() {
this.gotoAndPlay("out");
};
}
detalles.htmlText = "";
} else {
detalles.htmlText = "Se produjo el siguiente error: <b>"+this.msg+"</b>";
}
} else {
detalles.htmlText = "<b>Error al cargar los datos</b>";
}
};
datos_bd.sendAndLoad("http://localhost/juan/loadcopia.php", datos_bd, "POST");
Código :
Código :