crap.onEnterFrame = function(){ if(this._x<300) this._x++; else this.onEnterFrame = function(){ if(this._x>250) this._x--; else delete this.onEnterFrame; } }