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!