# Volume Control

**URL:** <https://forum.kirupa.com/t/volume-control/28433>\
**Category:** Uncategorized\
**Created:** [August 13, 2003, 6:53pm UTC](https://forum.kirupa.com/t/volume-control/28433 "2003-08-13T18:53:59Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jsumner](https://avatars.discourse-cdn.com/v4/letter/j/3e96dc/32.png) [@jsumner](https://forum.kirupa.com/u/jsumner)\
**Post date:** [August 13, 2003, 6:53pm UTC](https://forum.kirupa.com/t/volume-control/28433/1 "2003-08-13T18:53:59Z")

</div>

I read through the [Volume Control Tutorial](http://www.kirupa.com/developer/mx/volume_slider.htm) but I am wondering how I can get the volume to start off at something other than 0.

Has anyone addressed this problem or not?

---

<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:** [August 13, 2003, 7:02pm UTC](https://forum.kirupa.com/t/volume-control/28433/2 "2003-08-13T19:02:59Z")

</div>

well, my solution would be to create an empty movieclip with:

```auto
onClipEvent(load){
myvolume.setvolume = 0;
}

```

something like that, I didn’t take the tutorial…

anyway, should work if you play with it.

---

<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:** [August 13, 2003, 7:04pm UTC](https://forum.kirupa.com/t/volume-control/28433/3 "2003-08-13T19:04:05Z")

</div>

```auto
onClipEvent(load){
        myvolume.setVolume = 0;
}

```

:sure:

---

<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:** [August 13, 2003, 7:07pm UTC](https://forum.kirupa.com/t/volume-control/28433/4 "2003-08-13T19:07:09Z")

</div>

oh, so it is right. (except for the typo)

---

<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:** [August 13, 2003, 7:11pm UTC](https://forum.kirupa.com/t/volume-control/28433/5 "2003-08-13T19:11:04Z")

</div>

oh, just read whole thread - i’d do it like this:

```auto

loop = new Sound(_root);
_root.loop.setVolume = 0;

```

no need to make MC, but it isn’t 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:** [August 13, 2003, 7:11pm UTC](https://forum.kirupa.com/t/volume-control/28433/6 "2003-08-13T19:11:10Z")

</div>

It doesn’t seem to be working. I’ve tried it in the final version download and the version I put the code in.

This line:  
mySound.setVolume(\_root.volume);

seems like it would be the answer but I set the root.volume to 50 and ive tried replacing \_root.volume with the number 50 with no luck

Any other ideas?

---

<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:** [August 13, 2003, 7:18pm UTC](https://forum.kirupa.com/t/volume-control/28433/7 "2003-08-13T19:18:44Z")

</div>

give me your AS

and welcome to the forum :beam:

---

<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:** [August 13, 2003, 7:22pm UTC](https://forum.kirupa.com/t/volume-control/28433/8 "2003-08-13T19:22:15Z")

</div>

Pasted below and thanks!

* * *

onClipEvent (load) {  
mySound = new Sound();  
mySound.loadSound(“sound2.mp3”, false);  
}  
onClipEvent (enterFrame) {  
downloaded = mySound.getBytesLoaded();  
total = mySound.getBytesTotal();  
if (downloaded != total) {  
\_root.dl = “downloading song…”;  
} else {  
complete = 1;  
\_root.dl = “”;  
}  
mySound.setVolume(\_root.volume);  
}

---

<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:** [August 13, 2003, 7:24pm UTC](https://forum.kirupa.com/t/volume-control/28433/9 "2003-08-13T19:24:34Z")

</div>

```auto
onClipEvent (load) {
mySound = new Sound();
mySound.loadSound("sound2.mp3", false);
_root.vol = 0
}
onClipEvent (enterFrame) {
downloaded = mySound.getBytesLoaded();
total = mySound.getBytesTotal();
if (downloaded != total) {
_root.dl = "downloading song...";
} else {
complete = 1;
delete(_root.dl);
}
mySound.setVolume(_root.vol);
}

```

---

<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:** [August 13, 2003, 7:28pm UTC](https://forum.kirupa.com/t/volume-control/28433/10 "2003-08-13T19:28:03Z")

</div>

ok, its actually quitting time for me… I will check your progress in the morning. I appreciate everything!
