# What does Sound.attachSound do?

**URL:** <https://forum.kirupa.com/t/what-does-sound-attachsound-do/18957>\
**Category:** flash\
**Created:** [April 22, 2003, 10:39pm UTC](https://forum.kirupa.com/t/what-does-sound-attachsound-do/18957 "2003-04-22T22:39:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RageW0lf](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@RageW0lf](https://forum.kirupa.com/u/RageW0lf)\
**Post date:** [April 22, 2003, 10:39pm UTC](https://forum.kirupa.com/t/what-does-sound-attachsound-do/18957/1 "2003-04-22T22:39:12Z")

</div>

Yo,

just been playing with the sound object in flash MX. pretty clear on everything apart from :

**Sound.attachSound** not sure what this does or why its needed. I think it gives the sound a name or something? surely this is the same as going to library --\> linkage then naming it? so why would u need it?

I have been using sound to do stuff, and I havn’t used this at all but can do what I want, so I just want to understand what its for and can you give me an example when its imperitive to use it?

cheers!

---

<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:** [April 22, 2003, 10:55pm UTC](https://forum.kirupa.com/t/what-does-sound-attachsound-do/18957/2 "2003-04-22T22:55:16Z")

</div>

It is to play sound from within the library instead of dragging it on the stage.

It is the attachMovie() of the Sound object 😉

Check out this tutorial…

[http://www.kirupa.com/developer/actionscript/sound.htm](http://www.kirupa.com/developer/actionscript/sound.htm)

---

<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:** [April 23, 2003, 8:16pm UTC](https://forum.kirupa.com/t/what-does-sound-attachsound-do/18957/3 "2003-04-23T20:16:50Z")

</div>

thanks.
