Wait until frames end not interval

Basically is there any way to make kirupas xml slideshow wait until a loaded movies frames have reaced an end before loading the next image/swf?

http://www.kirupa.com/developer/mx2004/xml_slideshow3.htm/

I’ve added a check of the current frames against totalframes into the slideshow function but its not working…


function slideshow() {
    myInterval = setInterval(pause_slideshow, delay);
    function pause_slideshow() {
        clearInterval(myInterval);
    if (this._currentframe>=this._totalframes){
        if (p == (total-1)) {
            p = 0;
            firstImage();
        } else {
            nextImage();
        }
    }
    }
}

Thanks!