where in this code can i put a simple trace() to run after the “4” in the array reaches an alpha of zero? I assume I’ll need to delete this.onEnterFrame; as well?
stop();
MovieClip.prototype.OpacityTransition = function (max, min, step) {
this.messages = new Array("1","2","3","4");
this.max = max;
this.min = min;
this.step = step;
this.counter = 1;
this.fadeIn = true;
this._alpha = min;
this.message = this.messages[0];
this.onEnterFrame = function () {
if (this.fadeIn) {
this._alpha += this.step;
}else{
this._alpha -= this.step;
}
if (this._alpha <= this.min || this._alpha >= this.max) {
this.fadeIn = !this.fadeIn;
if (this.fadeIn) {
this.message = this.messages[this.counter++];
if (this.counter >= this.messages.length) {
this.counter = 0;
}
}
}
};
};
message.OpacityTransition (100, 0, 5);