Auto-rotation for a slideshow through actionscript

I was hoping someone could help me figure out how to make a slideshow rotate with actionscript. Currently the code I have keeps it static until a button click. On pushing a button, 1 through 6, it will go to the corresponding photo in the slide. I want it to rotate thru all photos 1-6 until the user pushes any button, then the sliding will stop. Any help would REALLY be appreciated. Thanks!

This is the code I’m using:

speed =5;
photo_width = 380;
slider_width = 14

photo_mc.onEnterFrame = function() {
photo_mc._x += (final_x - photo_mc._x)/speed;
}
slider.onEnterFrame = function() {
slider._x += (slider_final_x - slider._x)/speed;
}

btn01.onRelease = function() {
final_x =0;
slider_final_x = 0;
}

btn02.onRelease = function() {
final_x =-photo_width;
slider_final_x =+slider_width;
}

btn03.onRelease = function() {
final_x =-photo_width2;
slider_final_x =+slider_width
2;
}

btn04.onRelease = function() {
final_x =-photo_width3;
slider_final_x =+slider_width
3;
}

btn05.onRelease = function() {
final_x =-photo_width4;
slider_final_x =+slider_width
4;
}

btn06.onRelease = function() {
final_x =-photo_width5;
slider_final_x =+slider_width
5;
}