# setInterval help

**URL:** https://forum.kirupa.com/t/setinterval-help/167756
**Category:** flash
**Created:** [October 31, 2005, 6:09pm UTC](https://forum.kirupa.com/t/setinterval-help/167756 "2005-10-31T18:09:16Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rhamej](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@rhamej](https://forum.kirupa.com/u/rhamej)
#### Post date: [October 31, 2005, 6:09pm UTC](https://forum.kirupa.com/t/setinterval-help/167756/1 "2005-10-31T18:09:16Z")

</div>

I need the mc’s to sequentialy tween in instead of all tween in at once.  
I have the array’s and destY set up correctly I believe, but the for loop just tweens them all.

```auto

var destYm = [0, 100, 200];
var mc_s = [b0, b1, b2];
var speed = 5;
MovieClip.prototype.slideIn = function() {
    this.onEnterFrame = function() {
        this._y += (this.destY-this._y)/speed;
        if (Math.abs(this.destY-this._y)<1) {
            this._y = this.destY;
            trace('im deleted');
            delete this.onEnterFrame;
        }
        if (this.destY == 200 && Math.abs(this.destY-this._y)<1) {
            trace('im last');
        }
    };
};
for (i=0; i<mc_s.length; i++) {
    mc_s*.destY = destYm*;
    mc_s*.slideIn();
}

```
