actionscript 2.0 movieclip fade out and fade in function ·
Jul 08, 2009 Add to keyframe 1's actionscript layerMovieClip.prototype.fadeOut = function(alpha) {
this.onEnterFrame = function() {
//this._alpha=60;
this._alpha += (alpha-this._alpha)/2;
if (this._alpha == 0) {
delete this.onEnterFrame;
}
};
};
MovieClip.prototype.fadeIn = function(alpha) {
this.onEnterFrame = function() {
//this._alpha=100;
this._alpha += (alpha-this._alpha)/2;
if (this._alpha == 100) {
delete this.onEnterFrame;
}
};
};
//you call this effect by adding it to any keyframe and use:
// yourmovieclipname.fadeOut(40);
//this fades the movieclip out to 40
— Zeus ::)