onClipEvent(enterFrame) - deleting it

Just touching up on my AS, seem to lost a bit :stuck_out_tongue:

Why doesn’t this code work?

onClipEvent (enterFrame) {
	this._x = this._x+20;
	if (this._x>300) {
		delete this.onEnterFrame;

	}
}

Thanks :slight_smile: