# Button to load mp3 file

**URL:** <https://forum.kirupa.com/t/button-to-load-mp3-file/58680>\
**Category:** flash\
**Created:** [July 24, 2004, 10:29pm UTC](https://forum.kirupa.com/t/button-to-load-mp3-file/58680 "2004-07-24T22:29:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![DKZete](https://avatars.discourse-cdn.com/v4/letter/d/f04885/32.png) [@DKZete](https://forum.kirupa.com/u/DKZete)\
**Post date:** [July 24, 2004, 10:29pm UTC](https://forum.kirupa.com/t/button-to-load-mp3-file/58680/1 "2004-07-24T22:29:51Z")

</div>

I’m having trouble getting my button to load an mp3 file. I have the button, I have the mp3 in my library. I’ve tried using Behaviors as well as AS, neither one seems to work. I’m probably missing something really stupid, but I can’t figure it out.

Any thoughts?

Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 25, 2004, 12:13am UTC](https://forum.kirupa.com/t/button-to-load-mp3-file/58680/2 "2004-07-25T00:13:13Z")

</div>

are you sure your sound is linked?

check out

[http://kennybellew.com](http://kennybellew.com)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 25, 2004, 4:23am UTC](https://forum.kirupa.com/t/button-to-load-mp3-file/58680/3 "2004-07-25T04:23:42Z")

</div>

Thanks a million, i’ll check it out.

I was pretty sure my sound was linked. It was in the library, I linked it. It plays when i load the HTML, but not because i press the button, it just starts on its own. I’ll try this tutorial though!

G

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 25, 2004, 6:54am UTC](https://forum.kirupa.com/t/button-to-load-mp3-file/58680/4 "2004-07-25T06:54:10Z")

</div>

The sound is linked (thanks again for the help, the website has been a big help), But I keep getting this error:

**Error** Scene=Scene 1, layer=1, frame=1:Line 2: Statement must appear within on handler  
firstSound=new Sound();

What is the ‘handler’…like I said, I’m new at AS.  
I’m not sure what this is telling me…when I preview in HTML, the sound is playing (despite the error message). But not becuase I pressed the button, it just goes on its own.

I’m probably missing something really stupid, any thoughts?

Thanks

> [@Digitalosophy](#):
>
> are you sure your sound is linked?
> 
> check out
> 
> [http://kennybellew.com](http://kennybellew.com/)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 25, 2004, 7:44am UTC](https://forum.kirupa.com/t/button-to-load-mp3-file/58680/5 "2004-07-25T07:44:50Z")

</div>

Okay, I’m sorry. I’m an idiot. I figured it out.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 25, 2004, 8:42am UTC](https://forum.kirupa.com/t/button-to-load-mp3-file/58680/6 "2004-07-25T08:42:48Z")

</div>

yeah im guessing you put the actions on the movieclip itsself or something like that.

glad its working 🙂
