Comunidad de diseño web y desarrollo en internet online

urge solucion preloader

Citar            
MensajeEscrito el 25 Mar 2008 08:09 pm
hola tengo el siguiente codigo y por mas ke lo intento lo logro ke funcione bien,simplemente se queda atorado el el frame 2,intente mandarlo a otra scene y es lo mismo

onEnterFrame=function(){

datosT=_root.getBytesTotal();
datosC=_root.getBytesLoaded();

porcentaje=Math.round(100*datosC/datosT)+"%";
bar._xscale=100*datosC/datosT;

if(porcentaje=="100%")
gotoAndplay(2);

}
}

Por Arthurv

3 de clabLevel



Genero:Masculino  

msie
Citar            
MensajeEscrito el 25 Mar 2008 09:12 pm

Arthurv escribió:

hola tengo el siguiente codigo y por mas ke lo intento lo logro ke funcione bien,simplemente se queda atorado el el frame 2,intente mandarlo a otra scene y es lo mismo



mmm lo ideal sería que no mezclaras números con cadenas
stop(); // importante

Código :

onEnterFrame=function(){
   datosT=_root.getBytesTotal();
   datosC=_root.getBytesLoaded();
   porcentaje = Math.round((datosC/datosT)*100);
   bar._xscale = porcentaje; // porcentaje manejalo como un numero
        //si necesitas mostrar el porcentaje en algna salida entonces aqui añadele el % y lo muestras
        // porcentaje_txt.text = porcentaje + "%";
   if(porcentaje >= 100)
         gotoAndplay(2);   
   }
}

Por rolv

Claber

2000 de clabLevel

3 tutoriales

 

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.