# Sounds in AS

**URL:** <https://forum.kirupa.com/t/sounds-in-as/42473>\
**Category:** Uncategorized\
**Created:** [February 9, 2004, 6:43pm UTC](https://forum.kirupa.com/t/sounds-in-as/42473 "2004-02-09T18:43:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![UltimateDefiler](https://avatars.discourse-cdn.com/v4/letter/u/b782af/32.png) [@UltimateDefiler](https://forum.kirupa.com/u/UltimateDefiler)\
**Post date:** [February 9, 2004, 6:43pm UTC](https://forum.kirupa.com/t/sounds-in-as/42473/1 "2004-02-09T18:43:26Z")

</div>

how do i code flash to play a sound???  
i read the tutorioal and it doesn’t seem to work in flash MX . . .

---

<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:** [February 9, 2004, 11:57pm UTC](https://forum.kirupa.com/t/sounds-in-as/42473/2 "2004-02-09T23:57:39Z")

</div>

its really easy actually:

first you import the sound to the library (file - import to library)

then you right click it in the library an select linkage

check export for actionscript and give it a linking name lets say “mySound”

for the code:

[AS]  
//create a sound instance  
mySound = new Sound();  
//attach our sound  
mySound.attachSound(“mySound”)  
//code for playing it  
mySound.start()  
[/AS]

hope that helps! :crazy: (-:

---

<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:** [February 10, 2004, 10:45am UTC](https://forum.kirupa.com/t/sounds-in-as/42473/3 "2004-02-10T10:45:34Z")

</div>

Have a look here  
[http://www.kennybellew.com/](http://www.kennybellew.com/)

scotty(-:
