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

**URL:** <https://forum.kirupa.com/t/how-to-swap-image-index-on-last-frame-for-cross-dissolve-effect/308068>\
**Category:** flash\
**Created:** [April 16, 2010, 4:14pm UTC](https://forum.kirupa.com/t/how-to-swap-image-index-on-last-frame-for-cross-dissolve-effect/308068 "2010-04-16T16:14:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Obi\_Wan](https://avatars.discourse-cdn.com/v4/letter/o/e99b99/32.png) [@Obi\_Wan](https://forum.kirupa.com/u/Obi_Wan)\
**Post date:** [April 16, 2010, 4:14pm UTC](https://forum.kirupa.com/t/how-to-swap-image-index-on-last-frame-for-cross-dissolve-effect/308068/1 "2010-04-16T16:14:20Z")

</div>

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 🙂 Any help would be appreciated.

```auto

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();
}

```
