# Attach sound AS problem

**URL:** <https://forum.kirupa.com/t/attach-sound-as-problem/162812>\
**Category:** Uncategorized\
**Created:** [September 16, 2005, 1:44pm UTC](https://forum.kirupa.com/t/attach-sound-as-problem/162812 "2005-09-16T13:44:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wickedBoy](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/wickedboy/32/1100_2.png) [@wickedBoy](https://forum.kirupa.com/u/wickedBoy)\
**Post date:** [September 16, 2005, 1:44pm UTC](https://forum.kirupa.com/t/attach-sound-as-problem/162812/1 "2005-09-16T13:44:09Z")

</div>

I’m trying to use the attach sound method when a Btn hits an MC one using this code but I’m not sure where to add the code. Can someone help me please? I want the sound to start when the Btn eases into the MC.

wB

```auto

if (!dropZone.hitTest(this)) {
        this.onEnterFrame = function() {
            this._x += (this.startX-this._x)*speed;
            this._y += (this.startY-this._y)*speed;
if (this._x<this.startX+1 && this._x>this.startX-1 && this._y<this.startY+1 && this._y>this.startY-1) {
                this._x = this.startX;
                this._y = this.startY;
                delete this.onEnterFrame;
            }
        };

```
