Foros del Web » Creando para Internet » Flash y Actionscript »

Problemas con un Count getTimer()

Estas en el tema de Problemas con un Count getTimer() en el foro de Flash y Actionscript en Foros del Web. Hola !! Si alguien ya ah utilizado el getTimer y me puede auxiliar se los eh de agradecer !!! Bueno tengo el siguiente script ################################################## ...
  #1 (permalink)  
Antiguo 13/09/2007, 08:57
 
Fecha de Ingreso: junio-2002
Ubicación: En el trabajo...
Mensajes: 106
Antigüedad: 21 años, 10 meses
Puntos: 0
Exclamación Problemas con un Count getTimer()

Hola !!

Si alguien ya ah utilizado el getTimer y me puede auxiliar se los eh de agradecer !!!

Bueno tengo el siguiente script

################################################## #

myTime.onLoad = function() {
myTime.setStyle("borderStyle", "default"); // set style for input box
}

mySound = new Sound(); // define new sound object
mySound.attachSound("beep"); // attach sound to object

countDown = function() { // define countDown function
hours = int(runTime / 3600); // calculate remaining hours
if (hours < 10) {hours = "0" + hours;} // -- adjust hours display
minutes = int((runTime / 60) - (hours * 60)); // calculate remaining minutes
if (minutes < 10) {minutes = "0" + minutes;}// -- adjust minutes display
seconds = int((runTime % 60)); // calculate remaining seconds
if (seconds < 10) {seconds = "0" + seconds;}// -- adjust seconds display
// trace ("Te quedan 10 minutos ");
if (runTime <= 0) { // stop timer if zero
txtDone._visible = true; // show txtDone text

runTime = runTime + 1; // Increment total seconds

// mandar al goto and play 2 donde debe de hacer lo contrario subir la numeracion
//xOut._visible = true; // show xOut graphic
// mySound.start(0,35); se quita el sonido // start sound object
// timer = clearInterval(timer); // stop timer
} else {
runTime = runTime - 1; // decrement total seconds

// mandar al goto and play 2 donde debe de hacer lo contrario subir la numeracion
}
}

btnStart.onRelease = function() {
if (myTime.text == "") { // check for blank input
myTime.setStyle("borderStyle", "alert"); // set alert borderStyle
} else {
runTime = Number(myTime.text) * 60; // calculate total seconds
myTime.setStyle("color", 0xCC0000); // set input box text color
myTime.editable = false; // disable input box
btnStart._visible = 0; // hide start button
timer = setInterval(countDown, 1000); // start timer
}
}
btnReset.onRelease = function() {
myTime.setStyle("borderStyle", "default"); // reset border style
btnStart._visible = 1; // unhide start button
myTime.text = ""; // reset input box
myTime.setStyle("color", 0x000000); // set input box text color
myTime.editable = true; // enable input box
hours = "00"; // reset countdown hours
minutes = "00"; // reset countdown minutes
seconds = "00"; // reset countdown seconds
txtDone._visible = false; // hide txtDone text
xOut._visible = false; // hide xOut graphic
timer = clearInterval(timer); // stop timer
}

################################################## ##

En donde mi function countDown() hace bien la funcion en ir en retroceso, pero me gustaria que en cuanto llegara a 0 empezar a incrementar la numeracion

meti las siguientes linas lo hace pero como esta dentro del mismo countDown empieza a incrementar y a disminir por la misma funcion como puedo hacer otra funcion que me empiece a incrementar.

Gracias

Saludos !!

Izam
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 11:54.