Already I have solved the problem. I still have that the code to purify a bit that it is sure that this slightly dirty, but now it is working perfectly at KM.
The code is now:
It´s working now yours can see:Code:Stage.scaleMode = "noScale"; //recibe bytes devuleve kb function bytes2kb(val){ return Math.round(val/1024) } //holder para el contenido. createEmptyMovieClip("holder",1); //atachamos el preloader. attachMovie("loader","loader",2,{_x:283,_y:229}); loader.box.autoSize = "right"; loader.barra._xscale = 1; //objeto mcloader my_mcl = new MovieClipLoader(); //listener my_mcl_listener = new Object(); //callback para cuando empieze la carga my_mcl_listener.onLoadStart = function(t){ trace("inicia carga"); t._visible = false; } //callback cada vez que se cargue algo my_mcl_listener.onLoadProgress = function (t,bl,bt){ var p = (bl / bt) * 100 loader.box.text = "cargados: " + bytes2kb(bl) + " de " + bytes2kb(bt) + "KB"; loader.barra._xscale = p; } //callback en caso de error my_mcl_listener.onLoadError = function (t,ec){ trace("ups! error " + ec) loader.box.text = ec; } //callback para cuando se termina la carga. my_mcl_listener.onLoadComplete = function(t){ loader._visible = false; t._visible = true; trace("fin de la carga."); } //agregamos el listener al mcloader my_mcl.addListener(my_mcl_listener); //cargamos la imagen. my_mcl.loadClip("index.swf",holder); stop();
HERE
Thanks infinites for your attention and I sorry for the coment in this code, it is spanish, that is my language.




Reply With Quote