# Help out a newbie....auto play slide show

**URL:** <https://forum.kirupa.com/t/help-out-a-newbie-auto-play-slide-show/163569>\
**Category:** flash\
**Created:** [September 23, 2005, 2:12pm UTC](https://forum.kirupa.com/t/help-out-a-newbie-auto-play-slide-show/163569 "2005-09-23T14:12:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eeeeevon](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/eeeeevon/32/1266_2.png) [@eeeeevon](https://forum.kirupa.com/u/eeeeevon)\
**Post date:** [September 23, 2005, 2:12pm UTC](https://forum.kirupa.com/t/help-out-a-newbie-auto-play-slide-show/163569/1 "2005-09-23T14:12:33Z")

</div>

Hi-- I’m using the load\_images.fla template to create a slide show that will load images automatically from a certain folder… ok i’m a total newbie here…  
I need to have the slide show autoplay. I know this has to do with setting a timer or somthing… but I’m not totally clear on how to do it- I want to get rid of the next and previous buttons and just have it autoplay:

[color=green]//initialize variables and properties  
square.\_alpha = 0;  
whichPic = 1;  
//initiate change to new image when buttons are clicked  
next.onPress = function() {  
if (whichPic\<5 && !fadeIn && !fadeOut) {  
fadeOut = true;  
whichpic++;  
input = whichPic;  
}  
};  
back.onPress = function() {  
if (whichPic\>1 && !fadeIn && !fadeOut) {  
fadeOut = true;  
whichpic–;  
input = whichPic;  
}  
};  
\_root.onEnterFrame = function() {  
// when a new Photo is selected, fade out, load new image, and fade in  
if (square.\_alpha\>10 && fadeOut) {  
square.\_alpha -= 10;  
}  
if (square.\_alpha\<10) {  
loadMovie("…/images/image"+whichPic+".jpg", “square”);  
fadeOut = false;  
fadeIn = true;  
}  
if (square.\_alpha\<100 && fadeIn && !fadeOut) {  
square.\_alpha += 10;  
} else {  
fadeIn = false;  
}  
// limit input field  
if (input\>5) {  
input = 5;  
}  
// initiate change to new image when Enter key is pressed  
if (Key.isDown(Key.ENTER)) {  
fadeOut = true;  
whichpic = input;  
}  
};  
// if a number is entered in the input field but Enter is not pressed, change  
// back to current Photo number when clicking anywhere else  
inputField.onKillFocus = function() {  
input = whichPic;  
};  
[/color]
