# Sound volume per object

**URL:** https://forum.kirupa.com/t/sound-volume-per-object/184484
**Category:** flash
**Created:** [April 5, 2006, 1:09pm UTC](https://forum.kirupa.com/t/sound-volume-per-object/184484 "2006-04-05T13:09:17Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Ophyr](https://avatars.discourse-cdn.com/v4/letter/o/41988e/32.png) [@Ophyr](https://forum.kirupa.com/u/Ophyr)
#### Post date: [April 5, 2006, 1:09pm UTC](https://forum.kirupa.com/t/sound-volume-per-object/184484/1 "2006-04-05T13:09:17Z")

</div>

Hi guys,

I can’t seem to figure out how I set the volume of a single sound object. Everytime I use setVolume on a sound, it is applied to _all_ sound objects playing :h:

The code that I’m using :

```auto
music = new Sound();
music.attachSound("music");
music.start(0, 5);
music.setVolume(1);

```

---

<div class="post-metadata">

### Author: ![Ophyr](https://avatars.discourse-cdn.com/v4/letter/o/41988e/32.png) [@Ophyr](https://forum.kirupa.com/u/Ophyr)
#### Post date: [April 5, 2006, 1:22pm UTC](https://forum.kirupa.com/t/sound-volume-per-object/184484/2 "2006-04-05T13:22:31Z")

</div>

Apparently, it’ll work if you give the sound its own movieclip like this :

> music = new Sound(\_root.createEmptyMovieClip(‘bgm’, 1));

music.attachSound(“music”);  
music.start(0, 5);  
\_root.music.setVolume(1);
