Timer for kirupa Photo Slideshow Using XML and Flash

Hello fellow flash people :rambo: ,

  • any idea on how to add a sort of timer for the slideshow…one that counts down from fx 6 seconds to 0 every time a new image in the slideshow appears. something with a variable and a text area…but how to make the count down follow the image delay…i really would like to know if this is possible.

any help out there?

regards
jonas

Do a search for setInterval =)

var clock = this.createEmptyMovieClip("clock", this.getNextHighestDepth());
function showTime() {
	var sttime = getTimer();
	clock.onEnterFrame = function() {
		prtime = getTimer();
		var dur = Math.floor((prtime-sttime)/1000);
		time_txt.text = "0:0"+dur;
	};
}

call this function where you set the interval eg in pause_slideshow add

showTime();

scotty(-:

Thanks Scotty and Rhamej

I will try that and get back when i get it to work.

thanks again.

jonas