Ver Mensaje Individual
  #2 (permalink)  
Antiguo 31/01/2005, 15:03
Avatar de S I D I U S
S I D I U S
 
Fecha de Ingreso: noviembre-2002
Ubicación: D.F.
Mensajes: 290
Antigüedad: 21 años, 5 meses
Puntos: 0
te adapte un prototypo a lo que tu necesitas!
en el root:

Código:
MovieClip.prototype.loadjpg = function(clip, eljpg) {
	var mcCarga = this.createEmptyMovieClip("mcCarga", 1);
	mcCarga.loadMovie(eljpg);
	this.onEnterFrame = function() {
		mcCarga._visible = false;
		var tLoaded, tBytes;
		tLoaded = mcCarga.getBytesLoaded();
		tBytes = mcCarga.getBytesTotal();
		var porcentaje = int(tLoaded*100/tBytes);
		info_txt.text = porcentaje+" % of "+eljpg+" loaded";
		// Make sure stream has started
		if (isNaN(tBytes) || tBytes<4) {
			return;
		}
		// jump out and play if fully loaded
		if (tLoaded/tBytes>=1) {
			// now load it the placeholder and show it
			clip.loadMovie(eljpg);
			info_txt.text = "loaded";
			delete this.onEnterFrame;
		}
	};
};
en los botones:

Código:
on (release) {
	loadjpg(_root.contenedor, "002.jpg");
}

ejemplo precarga jpg


Suerte!
__________________
http://www.execomnet.com