# Timer for kirupa Photo Slideshow Using XML and Flash

**URL:** https://forum.kirupa.com/t/timer-for-kirupa-photo-slideshow-using-xml-and-flash/185787
**Category:** flash
**Created:** [April 16, 2006, 3:26pm UTC](https://forum.kirupa.com/t/timer-for-kirupa-photo-slideshow-using-xml-and-flash/185787 "2006-04-16T15:26:38Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![lysholdt](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@lysholdt](https://forum.kirupa.com/u/lysholdt)
#### Post date: [April 16, 2006, 3:26pm UTC](https://forum.kirupa.com/t/timer-for-kirupa-photo-slideshow-using-xml-and-flash/185787/1 "2006-04-16T15:26:38Z")

</div>

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

---

<div class="post-metadata">

### Author: ![rhamej](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@rhamej](https://forum.kirupa.com/u/rhamej)
#### Post date: [April 16, 2006, 4:57pm UTC](https://forum.kirupa.com/t/timer-for-kirupa-photo-slideshow-using-xml-and-flash/185787/2 "2006-04-16T16:57:25Z")

</div>

Do a search for setInterval =)

---

<div class="post-metadata">

### Author: ![scotty](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@scotty](https://forum.kirupa.com/u/scotty)
#### Post date: [April 17, 2006, 5:46am UTC](https://forum.kirupa.com/t/timer-for-kirupa-photo-slideshow-using-xml-and-flash/185787/3 "2006-04-17T05:46:44Z")

</div>

```auto
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

```auto
showTime();

```

scotty(-:

---

<div class="post-metadata">

### Author: ![lysholdt](https://avatars.discourse-cdn.com/v4/letter/l/dbc845/32.png) [@lysholdt](https://forum.kirupa.com/u/lysholdt)
#### Post date: [April 19, 2006, 7:43pm UTC](https://forum.kirupa.com/t/timer-for-kirupa-photo-slideshow-using-xml-and-flash/185787/4 "2006-04-19T19:43:22Z")

</div>

Thanks Scotty and Rhamej

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

thanks again.

jonas
