Un saludo.
Código:
_global.foto;
var resultado:LoadVars = new LoadVars();
resultado.onLoad = function(success:Boolean) {
if (success) {
//trace(this);
if(this.output=="ok"){
_global.foto = this.foto;
estadoReg.text = "";
_root.cargarFoto();
}else {
trace(this.mensaje+" devuelve ...... Error");
estadoReg.text = "";
estadoReg.text = this.mensaje;
}
}
};
var alta:LoadVars = new LoadVars();
alta.idF = _root.idFoto;
alta.tipo = _root.tipo;
alta.sendAndLoad("dameFoto.asp", resultado, "POST");
function cargarFoto(){
var container:MovieClip = this.createEmptyMovieClip("container", this.getNextHighestDepth());
var mcLoader:MovieClipLoader = new MovieClipLoader();
var listener:Object = new Object();
loadListener.onLoadComplete = function(target_mc:MovieClip):Void {
_root.carga.text = "";
}
listener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
trace(target + ".onLoadProgress with " + bytesLoaded + " bytes of " + bytesTotal);
_root.carga.text = Math.round((bytesLoaded*100)/bytesTotal)+"%";
}
listener.onLoadInit = function(target:MovieClip):Void {
trace(target + ".onLoadInit");
target_mc._parent._alpha=0;
target_mc._parent.tween("_alpha", 100, 2, "easeOutBack", 0);
}
mcLoader.addListener(listener);
mcLoader.loadClip(_global.foto, container);
}
stop();

