# Fading alpha of mc's each to a certain percent, using setInterval to delay

**URL:** <https://forum.kirupa.com/t/fading-alpha-of-mcs-each-to-a-certain-percent-using-setinterval-to-delay/87521>\
**Category:** flash\
**Created:** [April 21, 2005, 5:46pm UTC](https://forum.kirupa.com/t/fading-alpha-of-mcs-each-to-a-certain-percent-using-setinterval-to-delay/87521 "2005-04-21T17:46:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jillymo](https://avatars.discourse-cdn.com/v4/letter/j/5f9b8f/32.png) [@jillymo](https://forum.kirupa.com/u/jillymo)\
**Post date:** [April 21, 2005, 5:46pm UTC](https://forum.kirupa.com/t/fading-alpha-of-mcs-each-to-a-certain-percent-using-setinterval-to-delay/87521/1 "2005-04-21T17:46:40Z")

</div>

I have a movie that uses this code to load several mc’s:

```auto
var a = 1;
function attach(movieclip, x, y) {
	clearInterval(arguments.callee["Interval"+a]);
	clip = attachMovie("square","square"+1,a+1);
	clip._x = x;
	clip._y = y;
	clip.attachMovie(movieclip);
	a++;
}
attach.Interval1 = setInterval(attach, 500, "square1", -450, 25);
attach.Interval2 = setInterval(attach, 800, "square2", -410, 25);
attach.Interval3 = setInterval(attach, 1100, "square3", -370, 25);
attach.Interval4 = setInterval(attach, 1400, "square3", -330, 25);
attach.Interval5 = setInterval(attach, 1700, "square3", -290, 25);
attach.Interval6 = setInterval(attach, 2000, "square3", -250, 25);
attach.Interval7 = setInterval(attach, 2300, "square3", -210, 25);

```

Once they are loaded, I would like to use alpha fade on each square with progression…as in I would like to fade square1 to 80%, square2 to 70%, square3 to 60%, etc.

As of right now I am having trouble even getting square1 to fade at all, much less doing this in a progression (setInterval) with all of them.

You can [view current swf](http://www.cbservices.org/cbs/test/jill/squares.swf) if it helps envision what I am trying to accomplish.
