How to swap image index on last frame for cross dissolve effect

Hey everyone I have this gallery that cross dissolves and goes to the next slide. On the last slide I need to cross dissolve to the the first image because this gallery in particular loops. So essentially on the last image that is being loaded via XML I need to fade in the 1st image so when I cross dissolve it gets revealed on my mask transition. Make sense :slight_smile: Any help would be appreciated.


function resetSlides():void
{
    for (var i:int = 0; i < _vehiclesArr.length; i++)
    {
        _vehiclesArr*.carMask.x=0;
        _vehiclesArr*.alpha = 1;
    }
    TweenLite.delayedCall(3, startSlideShow);
    title_mc.adjustment_txt.text=_descriptionArray[0];
    formatDescriptionTxt();
}