# onClipEvent(enterFrame) - deleting it

**URL:** https://forum.kirupa.com/t/onclipevent-enterframe-deleting-it/234903
**Category:** flash
**Created:** [August 7, 2007, 3:01am UTC](https://forum.kirupa.com/t/onclipevent-enterframe-deleting-it/234903 "2007-08-07T03:01:08Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Dave](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@Dave](https://forum.kirupa.com/u/Dave)
#### Post date: [August 7, 2007, 3:01am UTC](https://forum.kirupa.com/t/onclipevent-enterframe-deleting-it/234903/1 "2007-08-07T03:01:08Z")

</div>

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

Why doesn’t this code work?

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

	}
}

```

Thanks 🙂
