# Looping Slide Presentation

**URL:** https://forum.kirupa.com/t/looping-slide-presentation/179096
**Category:** flash
**Created:** [February 16, 2006, 5:09pm UTC](https://forum.kirupa.com/t/looping-slide-presentation/179096 "2006-02-16T17:09:03Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Granata](https://avatars.discourse-cdn.com/v4/letter/g/71e660/32.png) [@Granata](https://forum.kirupa.com/u/Granata)
#### Post date: [February 16, 2006, 5:09pm UTC](https://forum.kirupa.com/t/looping-slide-presentation/179096/1 "2006-02-16T17:09:03Z")

</div>

Hello,

I am working on a slide presentation that automatically advances to the next slide or moves to the next or previous slide via navigation buttons.

This part I have finished.

I am having trouble getting the presentation to loop after the last slide. I have been able make it loop once the next button is pressed on the last slide but I cannot get it to advance to the first slide automatically.

Below is the code that I am using in the presentation (master) slide:

```php
on (load) {
setInterval(function () {
_root.presentation.currentSlide.gotoNextSlide();
}, 6000);

}

```

And the code for the next button:

```php
on (release) {

	  // GoTo Next Screen behavior
      var screen = null;
      var target = this;
      while((screen == null) && (target != undefined) && (target != null))
      {
        if(target instanceof mx.screens.Screen)
        {
          screen = target;
        }
        else
        {
          target = target._parent;
        }
      }
      if(screen instanceof mx.screens.Slide)
      {
		screen.rootSlide.gotoFirstSlide();
      }
	  // End GoTo Next Screen behavior
    
}

```

Any help with this is appreciated.
