Hi all,
I have the following functions that fade a movie clip in and out
Code:
fadeAmount = 1;
function fadeIn() {
this._alpha += fadeAmount;
if (this._alpha>=100) {
this._alpha = 100;
this.onEnterFrame = null;
}
}
function fadeOut() {
this._alpha -= fadeAmount;
if (this._alpha<=0) {
this._alpha = 0;
this.onEnterFrame = null;
}
}
and then I call the movie clip to start fading in and appear on stage
Code:
contentMC._alpha = 0;
contentMC.onEnterFrame = fadeIn;
what I need is some way to tell the movie "after you reach alpha 100, stay there for x seconds and then fade out" and execute this code:
Code:
contentMC._alpha = 100;
contentMC.onEnterFrame = fadeOut;
after it reaches alpha = 0 it should stop and stay there without looping back and starting to fade in again. Thanks.