# Attach the action

**URL:** <https://forum.kirupa.com/t/attach-the-action/107602>\
**Category:** Uncategorized\
**Created:** [April 16, 2004, 10:12pm UTC](https://forum.kirupa.com/t/attach-the-action/107602 "2004-04-16T22:12:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![flaxcreatures](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/flaxcreatures/32/448_2.png) [@flaxcreatures](https://forum.kirupa.com/u/flaxcreatures)\
**Post date:** [April 16, 2004, 10:12pm UTC](https://forum.kirupa.com/t/attach-the-action/107602/1 "2004-04-16T22:12:47Z")

</div>

Can someone tell me how to get this workin?

```auto

MovieClip.prototype.allButtons = function(dept) {
	for (var all in this) {
		if (this[all] instanceof Button) {
			pass = this[all].getDepth();
			if (this[all].getDepth() > dept) {
				this[all].moveIt();
			}
		}
	}
};
MovieClip.prototype.moveIt = function() {
	onEnterFrame = function () {
		this._y += ((posArr[dept] + 100) - this._y) * 0.2;
	};
};

```

I’m sure the moveIte prototype will never be triggered :s can someone tell me what I’m doin wrong?

thx a lot  
regards flax
