El AS que uso es el siguiente:
Código :
//-> declaramos variables
var nocache:String = "?nocaching="+random(65000);
var mcl:MovieClipLoader = new MovieClipLoader();
var listener:Object = new Object();
//-> funciones
listener.onLoadStart = function(target_mc) {
trace("Iniciando");
_root.attachMovie("cargador", "cargador_mc", _root.getNextHighestDepth());
//Ubicamos la barra en el escenario
_root.cargador_mc._y = 443;
_root.cargador_mc._x = 140;
};
listener.onLoadProgress = function(target_mc, loadedBytes, totalBytes) {
trace("En progreso");
//Declaramos la variable de calculo de porcentaje
var porcentaje:Number;
porcentaje = Math.round((loadedBytes*100)/totalBytes);
_root.cargador_mc.porcentaje_txt.text = porcentaje;
//Ahora escondemos el objeto de la precarga y lo frenamos
target_mc._visible = false;
target_mc.stop();
};
listener.onLoadComplete = function(target_mc) {
trace("Ya");
//mostramos el objeto
_root.container.caja_mc.gotoAndPlay(2);
target_mc._visible = true;
target_mc.play();
};
listener.onLoadInit = function(target_mc) {
//Como ya cargo completo, entonces quitamos el cargador
_root.cargador_mc.play();
/*EN EL FOTOGRAMA 15 DE CARGADOR_MC ESTA ESTE CODIGO:
stop();
_root.cargador_mc.removeMovieClip();*/
};
//-> agregamos el listener
mcl.addListener(listener);Gracias de antemano
