# Playing Sound using AS - AS errors!

**URL:** https://forum.kirupa.com/t/playing-sound-using-as-as-errors/156347
**Category:** flash
**Created:** [July 25, 2005, 9:37am UTC](https://forum.kirupa.com/t/playing-sound-using-as-as-errors/156347 "2005-07-25T09:37:51Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Vexir](https://avatars.discourse-cdn.com/v4/letter/v/a183cd/32.png) [@Vexir](https://forum.kirupa.com/u/Vexir)
#### Post date: [July 25, 2005, 9:37am UTC](https://forum.kirupa.com/t/playing-sound-using-as-as-errors/156347/1 "2005-07-25T09:37:51Z")

</div>

Hi guys, I’m trying to get a sound from the library to play when I click a button, and the button will drop down to a certain \_y when its clicked, but when I put this code on the button:

```auto

on (release) {
	onClipEvent(enterFrame) {
		if (this._y != -17.0) {
			this._y = this_ + 1;
		}
		else {
			this.attachSound(enigmated);
			this.play();
		}
	}
}

```

I get these errors:

```auto

**Error** Symbol=soundbar_tabs_mc, layer=1, frame=1:Line 2: Clip events are permitted only for movie clip instances
     	onClipEvent(enterFrame) {

Total ActionScript Errors: 1 Reported Errors: 1

```

Can anyone help me fix this? I don’t know whats going on…

Edit: Okay, two stupid errors, those fixed, but now I don’t know how to get this stupid sound to play and this animation to work… I mean, how else do you get a button to move if not through enterframe ?
