# mcTween: Cascading tweens

**URL:** <https://forum.kirupa.com/t/mctween-cascading-tweens/242548>\
**Category:** flash\
**Created:** [October 27, 2007, 10:28am UTC](https://forum.kirupa.com/t/mctween-cascading-tweens/242548 "2007-10-27T10:28:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![daffy\_dowden](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/daffy_dowden/32/2371_2.png) [@daffy\_dowden](https://forum.kirupa.com/u/daffy_dowden)\
**Post date:** [October 27, 2007, 10:28am UTC](https://forum.kirupa.com/t/mctween-cascading-tweens/242548/1 "2007-10-27T10:28:29Z")

</div>

I want to fade a series of pictures one after the other, such that they’ll loop around. I’m calling this a cascade.

So to do this, i’ve placed all of the image names into an array and I set all of their alpha properties to 100 to begin with. I think I then need a for loop that will iterate through the images, fading the image down to 0, waiting for a set period of time and then moving on.

Unfortunately, mcTween will fade all of the images at once in the for loop, so I need to prevent a tween from starting until the one before it has finished. I thought I could achieve this using a while loop and the isTweening property, but when I try and preview the flash movie it just gets into a recurring loop and the program hangs, and has to be exited.

What is the correct way to do this?

```auto

#include "mc_tween2.as"

var countInterval;
var images:Array = new Array();
images = [wine_mc, sunset_mc, poppies_mc, pool_mc, eastView_mc]

wine_mc._alpha = 100;
eastView_mc._alpha = 100;
pool_mc._alpha = 100;
sunset_mc._alpha = 100;
poppies_mc._alpha = 100;

for(var i = 0; i < images.length; i++){
    _root[images*].alphaTo(0,1,"linear")
    while(_root[images*].isTweening()) {
        //do nothing
    }
}

```

I haven’t gotten around to pausing between tweens, but I believe I used setInterval to pause execution before. I seem to remember someone telling me that this isn’t the best way to pause execution anymore. Can anyone clarify this?

many thanks!  
Daf
