test.onEnterFrame = function(){ if (this._alpha + 5 < 100)this._alpha += 5; else{ this._alpha = 100; delete this.onEnterFrame; } }