Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/12/2008, 04:30
Avatar de Nietzsche
Nietzsche
 
Fecha de Ingreso: enero-2005
Ubicación: MALAGA-ESPAÑA
Mensajes: 228
Antigüedad: 19 años, 3 meses
Puntos: 0
Preloader por detrás

Buenas, ¿alguien podría indicarme como modificar el siguinte código para que el preloader de la imagen no quede por detrás de la foto al cargar?. Soy algo novato en AS.

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();
__________________
Salud y libertad