# onClipEvent troubles

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

<div class="post-metadata">

### Author: ![East\_High](https://avatars.discourse-cdn.com/v4/letter/e/6de8d8/32.png) [@East\_High](https://forum.kirupa.com/u/East_High)
#### Post date: [February 27, 2005, 10:32pm UTC](https://forum.kirupa.com/t/onclipevent-troubles/81107/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;
	}
}

```
