Ver Mensaje Individual
  #1 (permalink)  
Antiguo 07/09/2005, 05:32
ulpicorreo
 
Fecha de Ingreso: septiembre-2005
Mensajes: 1
Antigüedad: 18 años, 7 meses
Puntos: 0
¿cómo hacer que la función autoplay vaya mas despacio?

¿cómo hacer que la función autoplay vaya mas despacio?

este es el código de un fofograma del clip de pelicula con los botones:

function updateFrame (inc) {
// send slides to new frame
newFrame = _root._currentFrame + inc;
_root.gotoAndStop(newFrame);

updateStatus();

if (_root._currentFrame == 1) {
prevBtn.gotoAndStop(2);
} else {
prevBtn.gotoAndStop(1);
}
if (_root._currentFrame == _root._totalFrames) {
nextBtn.gotoAndStop(2);
} else {
nextBtn.gotoAndStop(1);
}
}

function updateStatus () {
_root.statusField = _root._currentFrame + " of " + _root._totalFrames;
}

function autoplayInit () {
startTime = getTimer();
hideControls();
updateStatus();
}

function autoplay () {
if (autoplayStatus != 0) {
// get the current time and elapsed time
curTime = getTimer();
elapsedTime = curTime-startTime;

// update timer indicator
indicatorFrame = int(4/(delay/(elapsedTime/1000)));
indicator.gotoAndStop(indicatorFrame+1);

// if delay time if met, goto next photo
if (elapsedTime >= (delay*1000)) {
if (_root._currentframe == _root._totalframes) {
_root.gotoAndStop(1);
} else {
_root.nextFrame();
}
autoplayInit();
}
}
}

function hideControls () {
nextBtn.gotoAndStop(2);
prevBtn.gotoAndStop(2);
}

updateFrame();
autoplayStatus = 0;