Código ActionScript :
//1.- crear una animacion de barra de precarga dentro de un movie clip que dure exactamente 100 frames y con stop en el primero y ultimo frame. La nombraremos barra_mc (en nombre de instancia). //2.- dentro de barra_mc creamos 6 campos de texto de tipo "Dynamic Text", con la fuente que ustedes elijan para presentar el porcentaje de carga, bytes totales y descargados, velocidad, y tiempo restante. //3.- A cada campo lo llamaremos con un nombre de instancia... //4.- Nombre en "nombre de instancia" para: el porcentaje: porcentaje bytes descargados: downbytes bytes descargados: totbytes bytes restantes: rest Velocidad: vel tiempo restante: timer //5.- En la linea de tiempo principal crea otra capa y en el primer frame pon un "stop();" //6.- En la linea de tiempo principal selecciona barra_mc y presiona F9 y pega el codigo Action Script 2.0. //7.- TODO ESO EN EL FRAME 1 //ActionScript 2.0: onClipEvent (load) { StartTime = getTimer(); } onClipEvent (enterFrame) { if (_root.getBytesLoaded()<_root.getBytesTotal()) { Total = _root.getBytesTotal()/1000; Received = _root.getBytesLoaded()/1000; Restantes = (_root.getBytesTotal()-_root.getBytesLoaded())/1000; Percentage = (Received/Total)*100; Speed = Received/((getTimer()-StartTime)/1000); Remaining = (Total-Received)/Speed; _root.barra_mc.gotoAndStop(int(Percentage)); _root.barra_mc.porcentaje.text = int(Percentage) + "%"; _root.barra_mc.downbytes.text = int(Received); _root.barra_mc.totbytes.text = int(Total); _root.barra_mc.rest.text = int(Restantes); _root.barra_mc.timer.text = int(Remaining) + " seconds remaining..."; _root.barra_mc.vel.text = int(Speed) + " Kb/s"; } else { _root.play(); } }
GRACIAS...