AS2 - How do I make my XML slideshow play as 'Auto'?

Hi all,

I need help making my XML slideshow have an ‘auto slideshow’ feature. I just don’t know what the next step is, as I am still pretty new to Flash (AS2).

It works fine with ‘Previous’ and ‘Next’ buttons both loading pics and captions from an XML file.

Any pointers will be much appreciated. Here is the relevant code:

import mx.transitions.Tween;
import mx.transitions.easing.Strong;

function init() {
    myMCL.loadClip(picArray[currentWork], images_mc.holder1_mc);
    images_mc.captions.text = capArray[currentWork];
}

//--- XML ---//

var myXML:XML = new XML();
myXML.ignoreWhite = true;

var currentWork = 0;
var picArray:Array = new Array();
var capArray:Array = new Array();

myXML.onLoad = function (success) {
    if (success) {
        var ss:Array = myXML.firstChild.childNodes;
        for (i=0;i<ss.length;i++){
            picArray.push("work/" + ss*.attributes.url);
            capArray.push(ss*.attributes.caption);
        }
        init();
    }
    else 
    {
        trace("XML did not load");
    }
}

myXML.load("DVCslideshow.xml");

////-- Next arrow --////

images_mc.next_mc.onRelease = function() {
    if (currentContainer == images_mc.holder1_mc) {
        currentContainer = images_mc.holder2_mc;
    }
    else
    {
        currentContainer = images_mc.holder1_mc;
    }
    currentContainer._alpha = 0;
    images_mc.holder1_mc.swapDepths(images_mc.holder2_mc);
    if (currentWork < picArray.length-1) {
        currentWork++;
        
        images_mc.captions.text = capArray[currentWork];
    }
    else
    {
        currentWork = 0;
    }
    myMCL.loadClip(picArray[currentWork],currentContainer);
    images_mc.captions.text = capArray[currentWork];
    trace(currentWork);
}


////---- functions----////

function fadeIn(){
    new Tween(currentContainer,"_alpha",Strong.easeOut,0,100,12,false);
}

Explanation: In order for a cross fade to work I have two ‘container’ MCs that swapDepths so the above pic fades out to reveal the underlying image.

Thanks.