/* clase Loading */ class Loading { // private var porcentaje:Number = 0; private static var arrayArch:Array = new Array(); private static var pos:Number; private static var archSelecc:String; private static var sumaBytesCargados:Number = 0; private static var sumaBytesTotales:Number = 0; //private static var idioma_actual:String = ""; // function Loading() { } //carga el array con los nombres de los archivos traidos desde el btn public function cargarDatos(arrayTemp:Array, archTemp:String) { for (var i:Number = 0; i0) { sumaBytesTotales += _root.contenedort_mc.getBytesTotal(); pos++; if (pos != arrayArch.length) { loadMovie(arrayArch[pos], _root.contenedort_mc); } else { delete (_root.oef_mc.onEnterFrame); unloadMovie(_root.contenedort_mc); removeMovieClip(_root.contenedort_mc); cargarArchivos(); } } }; } // //carga todos los archivos en cache private static function cargarArchivos() { //trace("f cargarArchivos"); _root.reporte_txt.text = "f cargarArchivos"; pos = 0; _root.createEmptyMovieClip("contenedor_a_mc",_root.getNextHighestDepth()); loadMovie(arrayArch[pos], _root.contenedor_a_mc); // /* _root.loading_mc._visible = true; _root.loading_mc.gotoAndPlay(1); _root.loading_mc.barra_mc.gotoAndStop(1); */ // _root.oef_mc.onEnterFrame = function() { porcentaje = Math.round((_root.contenedor_a_mc.getBytesLoaded()+sumaBytesCargados)*100/sumaBytesTotales); //trace(porcentaje); _root.loading_mc.barra_mc.gotoAndStop(porcentaje); _root.loading_mc.barra_mc.porcentaje_txt.text = porcentaje+"%"; if (_root.contenedor_a_mc.getBytesLoaded() == _root.contenedor_a_mc.getBytesTotal()) { sumaBytesCargados += _root.contenedor_a_mc.getBytesLoaded(); pos++; if (pos != arrayArch.length) { loadMovie(arrayArch[pos], _root.contenedor_a_mc); } else { delete (_root.oef_mc.onEnterFrame); unloadMovie(_root.oef_mc); removeMovieClip(_root.oef_mc); unloadMovie(_root.contenedor_a_mc); removeMovieClip(_root.contenedor_a_mc); _root.reporte_txt.text = "f cargarArchivos fin"; //trace("carga de archivos: 100%"); _root.loading_mc._visible = false; //trace("Loading: "+archSelecc); loadMovie(archSelecc, _root.contenedor_secc_mc); _root.reporte_txt.text = archSelecc; } } }; } }