# Sequential fading prototype?

**URL:** <https://forum.kirupa.com/t/sequential-fading-prototype/78726>\
**Category:** Uncategorized\
**Created:** [February 7, 2005, 7:38pm UTC](https://forum.kirupa.com/t/sequential-fading-prototype/78726 "2005-02-07T19:38:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![macneilslt](https://avatars.discourse-cdn.com/v4/letter/m/aeb1de/32.png) [@macneilslt](https://forum.kirupa.com/u/macneilslt)\
**Post date:** [February 7, 2005, 7:38pm UTC](https://forum.kirupa.com/t/sequential-fading-prototype/78726/1 "2005-02-07T19:38:21Z")

</div>

Okay, I have a few boxes, I want them to start out with an alpha value of 0, then after the first box alpha value reaches 75, I want the second one to start fading in, this is what I have so far, but they all fade in at the same time, can anyone point me in the right direction with this?

```auto

MovieClip.prototype.fadeIn = function() {
	if (this["b"+(i-1)]._alpha>=75) {
		this._alpha += 15;
	} else {
		this._alpha = 0;
	}
};
for (i=1; i<5; i++) {
	var box = this["b"+i];
	box._alpha = 0;
	/*b1.onEnterFrame = function() {
		if (this._alpha<=100) {
			this._alpha += 15;
		} else {
			delete this.onEnterFrame;
		}
	};
	*/
	box.onEnterFrame = function() {
		this.fadeIn();
	};
}

```
