meshok.onEnterFrame = function() { this._y = 50 + i; i = i + 5; if (this._y == 100) { delete this.onEnterFrame; } }