# How do I play a sound with actionscript

**URL:** <https://forum.kirupa.com/t/how-do-i-play-a-sound-with-actionscript/12270>\
**Category:** flash\
**Created:** [January 29, 2003, 1:36am UTC](https://forum.kirupa.com/t/how-do-i-play-a-sound-with-actionscript/12270 "2003-01-29T01:36:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Afro\_Ninja](https://avatars.discourse-cdn.com/v4/letter/a/85e7bf/32.png) [@Afro\_Ninja](https://forum.kirupa.com/u/Afro_Ninja)\
**Post date:** [January 29, 2003, 1:36am UTC](https://forum.kirupa.com/t/how-do-i-play-a-sound-with-actionscript/12270/1 "2003-01-29T01:36:25Z")

</div>

Honestly, this has got to be easy… I just don’t know the right command for it… I have a button, and on rollOver, I want to play an event sound

so on the button’s actions I have:

on (rollOver) {

}

what goes in the brackets?

---

<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:** [January 29, 2003, 1:41am UTC](https://forum.kirupa.com/t/how-do-i-play-a-sound-with-actionscript/12270/2 "2003-01-29T01:41:48Z")

</div>

If it’s just a sound effect like a small click sound, all you have to do is put the sound IN the button _over_ or _down_ frame.

---

<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:** [January 29, 2003, 2:16am UTC](https://forum.kirupa.com/t/how-do-i-play-a-sound-with-actionscript/12270/3 "2003-01-29T02:16:13Z")

</div>

Here is the best sound tutorial I have ever seen:

[http://www.flashkit.com/tutorials/Audio/Flash\_MX-Kenny\_Be-824/](http://www.flashkit.com/tutorials/Audio/Flash_MX-Kenny_Be-824/)

---

<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:** [January 29, 2003, 3:05am UTC](https://forum.kirupa.com/t/how-do-i-play-a-sound-with-actionscript/12270/4 "2003-01-29T03:05:18Z")

</div>

err, sorry guys, I meant roll **Out**

yeah I know how buttons work with putting sound in them.

thanks for the link!
