# Help :(

**URL:** <https://forum.kirupa.com/t/help/226514>\
**Category:** Uncategorized\
**Created:** [May 22, 2007, 12:34am UTC](https://forum.kirupa.com/t/help/226514 "2007-05-22T00:34:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Denise032](https://avatars.discourse-cdn.com/v4/letter/d/9e8a1a/32.png) [@Denise032](https://forum.kirupa.com/u/Denise032)\
**Post date:** [May 22, 2007, 12:34am UTC](https://forum.kirupa.com/t/help/226514/1 "2007-05-22T00:34:20Z")

</div>

OK, I’ve been going at this for over a week now and I just can’t figure it out. ☹

I’m using setInterval to fade in all MovieClips. All my pages are loaded from external movieclips into level 2. When I click a link to load an external page, it’ll pop up and disappear. What is causing this to happen? Am I doing something wrong with this code? :-/

“index.swf, level\_0”

```auto

loadMovieNum("home.swf", 2);

setInterval(fadeInFunction, 800);
counter = 0;
function fadeInFunction() {
    counter++;
    _root.Increment(counter, 100, 2);
}
function Increment(count, maxAlpha, speed) {
    _root.onEnterFrame = function() {
        _root["MovieClip_mc"+count]._alpha += speed;
        if (_root["MovieClip_mc"+count]._alpha>=maxAlpha) {
            _root["MovieClip_mc"+count]._alpha = maxAlpha;
            delete _root.onEnterFrame;
        }
    };
}

var colorful = new Color(_root.MovieClip_mc3);

MovieClip_mc3.onRollOver = function() {
    MovieClip.prototype.Increment = function(maxAlpha, speed) {
        this.onEnterFrame = function() {
        this._alpha += speed;
            if (this._alpha>=maxAlpha) {
                this._alpha = maxAlpha;
                delete this.onEnterFrame;
            }
        };
    };
with (MovieClip_mc3) {
    _alpha = 50;
Increment(100,4);
}
};

MovieClip_mc3.onRollOut = function() {
    MovieClip.prototype.Increment = function(maxAlpha, speed) {
        this.onEnterFrame = function() {
            this._alpha -= speed;
                if (this._alpha<=maxAlpha) {
                    this._alpha = maxAlpha;
                    delete this.onEnterFrame;
                }
            };
        };
with (MovieClip_mc3) {
    _alpha = 100;
Increment(50, 4);
}  
};

MovieClip_mc3.onRelease = function() {
    loadMovieNum("home.swf",2);
}

var colorful = new Color(_root.MovieClip_mc4);

MovieClip_mc4.onRollOver = function() {
    MovieClip.prototype.Increment = function(maxAlpha, speed) {
        this.onEnterFrame = function() {
        this._alpha += speed;
            if (this._alpha>=maxAlpha) {
                this._alpha = maxAlpha;
                delete this.onEnterFrame;
            }
        };
    };
with (MovieClip_mc4) {
    _alpha = 50;
Increment(100,4);
}
};

MovieClip_mc4.onRollOut = function() {
    MovieClip.prototype.Increment = function(maxAlpha, speed) {
        this.onEnterFrame = function() {
            this._alpha -= speed;
                if (this._alpha<=maxAlpha) {
                    this._alpha = maxAlpha;
                    delete this.onEnterFrame;
                }
            };
        };
with (MovieClip_mc4) {
    _alpha = 100;
Increment(50, 4);
}  
};

MovieClip_mc4.onRelease = function() {
    loadMovieNum("booking.swf",2);
}

var colorful = new Color(_root.MovieClip_mc5);

MovieClip_mc5.onRollOver = function() {
    MovieClip.prototype.Increment = function(maxAlpha, speed) {
        this.onEnterFrame = function() {
        this._alpha += speed;
            if (this._alpha>=maxAlpha) {
                this._alpha = maxAlpha;
                delete this.onEnterFrame;
            }
        };
    };
with (MovieClip_mc5) {
    _alpha = 50;
Increment(100,4);
}
};

MovieClip_mc5.onRollOut = function() {
    MovieClip.prototype.Increment = function(maxAlpha, speed) {
        this.onEnterFrame = function() {
            this._alpha -= speed;
                if (this._alpha<=maxAlpha) {
                    this._alpha = maxAlpha;
                    delete this.onEnterFrame;
                }
            };
        };
with (MovieClip_mc5) {
    _alpha = 100;
Increment(50, 4);
}  
};

MovieClip_mc5.onRelease = function() {
    loadMovieNum("venue.swf",2);
}

var colorful = new Color(_root.MovieClip_mc6);

MovieClip_mc6.onRollOver = function() {
    MovieClip.prototype.Increment = function(maxAlpha, speed) {
        this.onEnterFrame = function() {
        this._alpha += speed;
            if (this._alpha>=maxAlpha) {
                this._alpha = maxAlpha;
                delete this.onEnterFrame;
            }
        };
    };
with (MovieClip_mc6) {
    _alpha = 50;
Increment(100,4);
}
};

MovieClip_mc6.onRollOut = function() {
    MovieClip.prototype.Increment = function(maxAlpha, speed) {
        this.onEnterFrame = function() {
            this._alpha -= speed;
                if (this._alpha<=maxAlpha) {
                    this._alpha = maxAlpha;
                    delete this.onEnterFrame;
                }
            };
        };
with (MovieClip_mc6) {
    _alpha = 100;
Increment(50, 4);
}  
};

MovieClip_mc6.onRelease = function() {
    loadMovieNum("bio.swf",2);
}

var colorful = new Color(_root.MovieClip_mc7);

MovieClip_mc7.onRollOver = function() {
    MovieClip.prototype.Increment = function(maxAlpha, speed) {
        this.onEnterFrame = function() {
        this._alpha += speed;
            if (this._alpha>=maxAlpha) {
                this._alpha = maxAlpha;
                delete this.onEnterFrame;
            }
        };
    };
with (MovieClip_mc7) {
    _alpha = 50;
Increment(100,4);
}
};

MovieClip_mc7.onRollOut = function() {
    MovieClip.prototype.Increment = function(maxAlpha, speed) {
        this.onEnterFrame = function() {
            this._alpha -= speed;
                if (this._alpha<=maxAlpha) {
                    this._alpha = maxAlpha;
                    delete this.onEnterFrame;
                }
            };
        };
with (MovieClip_mc7) {
    _alpha = 100;
Increment(50, 4);
}  
};

MovieClip_mc7.onRelease = function() {
    loadMovieNum("photo.swf",2);
}

var colorful = new Color(_root.MovieClip_mc8);

MovieClip_mc8.onRollOver = function() {
    MovieClip.prototype.Increment = function(maxAlpha, speed) {
        this.onEnterFrame = function() {
        this._alpha += speed;
            if (this._alpha>=maxAlpha) {
                this._alpha = maxAlpha;
                delete this.onEnterFrame;
            }
        };
    };
with (MovieClip_mc8) {
    _alpha = 50;
Increment(100,4);
}
};

MovieClip_mc8.onRollOut = function() {
    MovieClip.prototype.Increment = function(maxAlpha, speed) {
        this.onEnterFrame = function() {
            this._alpha -= speed;
                if (this._alpha<=maxAlpha) {
                    this._alpha = maxAlpha;
                    delete this.onEnterFrame;
                }
            };
        };
with (MovieClip_mc8) {
    _alpha = 100;
Increment(50, 4);
}  
};

MovieClip_mc8.onRelease = function() {
    loadMovieNum("video.swf",2);
}

var colorful = new Color(_root.MovieClip_mc9);

MovieClip_mc9.onRollOver = function() {
    MovieClip.prototype.Increment = function(maxAlpha, speed) {
        this.onEnterFrame = function() {
        this._alpha += speed;
            if (this._alpha>=maxAlpha) {
                this._alpha = maxAlpha;
                delete this.onEnterFrame;
            }
        };
    };
with (MovieClip_mc9) {
    _alpha = 50;
Increment(100,4);
}
};

MovieClip_mc9.onRollOut = function() {
    MovieClip.prototype.Increment = function(maxAlpha, speed) {
        this.onEnterFrame = function() {
            this._alpha -= speed;
                if (this._alpha<=maxAlpha) {
                    this._alpha = maxAlpha;
                    delete this.onEnterFrame;
                }
            };
        };
with (MovieClip_mc9) {
    _alpha = 100;
Increment(50, 4);
}  
};

MovieClip_mc9.onRelease = function() {
    loadMovieNum("contact.swf",2);
}

```

“home.swf, level\_2” code:

```auto

stop();

setInterval(fadeInFunction, 800);
counter = 0;
function fadeInFunction() {
    counter++;
    _root.Increment(counter, 100, 2);
}
function Increment(count, maxAlpha, speed) {
    _root.onEnterFrame = function() {
        _root["MovieClip_mc"+count]._alpha += speed;
        if (_root["MovieClip_mc"+count]._alpha>=maxAlpha) {
            _root["MovieClip_mc"+count]._alpha = maxAlpha;
            delete _root.onEnterFrame;
        }
    };
}

```

Is there something I can fix or should I try an alternate method?
