# Sound object

**URL:** https://forum.kirupa.com/t/sound-object/10235
**Category:** flash
**Created:** [December 27, 2002, 4:58pm UTC](https://forum.kirupa.com/t/sound-object/10235 "2002-12-27T16:58:57Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![chapster](https://avatars.discourse-cdn.com/v4/letter/c/958977/32.png) [@chapster](https://forum.kirupa.com/u/chapster)
#### Post date: [December 27, 2002, 4:58pm UTC](https://forum.kirupa.com/t/sound-object/10235/1 "2002-12-27T16:58:57Z")

</div>

When I use this function it effects the volume of other sound effects that are placed in a mc timeline.

```auto

function callButtEffect() {
	BsoundEffect.attachSound("drip");
	BsoundEffect.setVolume(7);
	BsoundEffect.start(0, 1);
}

```

This is been called by a onRollOver event on a menu system,but when I set the volume of BsoundEffect.setVolume(7);  
it effects other sounds in other mc timelines which has nothing to do with the menu or this function.  
does this mean the setVolume effects all sounds.\<:}

---

<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: [December 27, 2002, 5:04pm UTC](https://forum.kirupa.com/t/sound-object/10235/2 "2002-12-27T17:04:02Z")

</div>

No. The setVolume doesn’t have to affect all the other timelines, you can modify your code to make it just affect a certain sound object.

---

<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: [December 27, 2002, 5:17pm UTC](https://forum.kirupa.com/t/sound-object/10235/3 "2002-12-27T17:17:58Z")

</div>

That’s what I thought. But right now when I call this function from a button it also is affecting sounds on 2 other timelines, which have nothing to do with the BsoundEffect sound object. The two other sounds are on a separate mc timeline. Why is this happening?

---

<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: [December 27, 2002, 5:40pm UTC](https://forum.kirupa.com/t/sound-object/10235/4 "2002-12-27T17:40:43Z")

</div>

Ok here is what I am doing

```auto

function callButtEffect() {
	buttSound=new Sound();
	buttSound.attachSound("drip");
	buttSound.setVolume(7);
	buttSound.start(0, 1);
}

```

Then on a menu button I call the function

```auto

clips[0].onRollOver = function() {
	callButtEffect();
}

```

Then some of the other mcs in the movie have other sounds placed on there timelines with the sound in edit mode I manualy lowered the volume. Now when I play my movie the other sounds are cut out because the volume is so low. But it should not even effect the sound of the other timelines.

---

<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: [December 27, 2002, 6:04pm UTC](https://forum.kirupa.com/t/sound-object/10235/5 "2002-12-27T18:04:49Z")

</div>

Ok here is an attached file where I have a mc with a sound effect then also a button with an event handler onRollOver which is calling a function with a separate sound object. Now the sound Object volume is affecting the separate timeline volume.  
Try it it’s whacked. What am I doing wrong.

---

<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: [December 28, 2002, 4:55pm UTC](https://forum.kirupa.com/t/sound-object/10235/6 "2002-12-28T16:55:11Z")

</div>

Can anyone tell me what is going wrong in the attached file please. Thanks
