# attachMovie with fade?

**URL:** <https://forum.kirupa.com/t/attachmovie-with-fade/106058>\
**Category:** Uncategorized\
**Created:** [April 1, 2004, 12:59pm UTC](https://forum.kirupa.com/t/attachmovie-with-fade/106058 "2004-04-01T12:59:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Inflicted](https://avatars.discourse-cdn.com/v4/letter/i/82dd89/32.png) [@Inflicted](https://forum.kirupa.com/u/Inflicted)\
**Post date:** [April 1, 2004, 12:59pm UTC](https://forum.kirupa.com/t/attachmovie-with-fade/106058/1 "2004-04-01T12:59:23Z")

</div>

I’m trying accomplish a fade-in for my attached  
movies, using this script:

```auto
nr = 1;
tot = 8;
MovieClip.prototype.attach = function(base) {
    base["content"+nr].attachMovie("mc"+nr, "clip"+nr, nr);
    if (nr == tot) {
        clearInterval(id);
    }
    nr++;
};
id = setInterval(attach, 1000, this);
MovieClip.prototype.fadein = function(base) {
    for (i=1; i<5; i++) {
        base["content"+i]._alpha = 0;
        base["content"+i].onEnterFrame = function() {
            this._alpha += 3;
            if (this._alpha>=100) {
                this._alpha = 100;
                delete this.onEnterFrame;
            }
            clearInterval(mc);
        };
    }
};
mc = setInterval(fadein, 1000, this);

```

But it doesn’t work. Can somebody help me out with this?

thanks  
[example here](http://www.inflicted.nl/example.fla.zip)
