Comunidad de diseño web y desarrollo en internet online

cronometro

Citar            
MensajeEscrito el 15 Sep 2008 02:45 pm
hola, disculpa q te moleste de nuevo, tengo una duda
yo quiero q sume x segundos, en este caso 5, cuando los seg lleguen a 5 q estes comiencen a bajar hasta 0 y una vez q llegue a 0, vuelva a sumar hasta 5, asi, sucesivamente, lo intente hacer, pero no funciona, q es lo q falta:

Código :


//funcion para contar el tiempo
frecuencia=setInterval(reloj,1000); 

function reloj (){
if (coin>=2){
tiempo++
}
//detiene el intervalo
if (tiempo==5) { 
    tiempo--;
}
else if (tiempo==0){
   tiempo++;
}
};



//variables
tiempo=0;
coin=0;


desde ya gracias.
saludos

Por bubudrc

Claber

591 de clabLevel

1 tutorial

 

mayo 2006

firefox
Citar            
MensajeEscrito el 15 Sep 2008 03:31 pm
No dupliques posts, ya te respondí.

Por elchininet

Claber

3921 de clabLevel

17 tutoriales

Genero:Masculino  

Front-end developer at Booking.com

firefox

 

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