# onClipEvent troubles

**URL:** https://forum.kirupa.com/t/onclipevent-troubles/139038
**Category:** Uncategorized
**Created:** [February 27, 2005, 10:32pm UTC](https://forum.kirupa.com/t/onclipevent-troubles/139038 "2005-02-27T22:32:26Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![imported\_East\_High](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/imported_east_high/32/1331_2.png) [@imported\_East\_High](https://forum.kirupa.com/u/imported_East_High)
#### Post date: [February 27, 2005, 10:32pm UTC](https://forum.kirupa.com/t/onclipevent-troubles/139038/1 "2005-02-27T22:32:26Z")

</div>

I’m trying to get my movie clip to ease into position with the below AS and then delete the actions, but it’s not working. What am I doing wrong?

```auto
onClipEvent (load) {
	targetY = 45;
}
onClipEvent (enterFrame) {
	this._y += (targetY-this._y)/8.5;
	trace(this._y);
	if (this._y == 45) {
		delete this.onEnterFrame;
	}
}

```
