# mp3 Volume Question ..please

**URL:** <https://forum.kirupa.com/t/mp3-volume-question-please/211811>\
**Category:** flash\
**Created:** [January 5, 2007, 10:20am UTC](https://forum.kirupa.com/t/mp3-volume-question-please/211811 "2007-01-05T10:20:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amy\_Peterson](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@Amy\_Peterson](https://forum.kirupa.com/u/Amy_Peterson)\
**Post date:** [January 5, 2007, 10:20am UTC](https://forum.kirupa.com/t/mp3-volume-question-please/211811/1 "2007-01-05T10:20:57Z")

</div>

hello, im working on a mp3 player based off of Kirupas mp3 tutorial thing…

Now wut im trying to do is wen i start my page, i want the music to be playing automatically …and i want the Volume scroll bar to be in the middle of the Volume slider (if possible)…

Here is the code which is in the PLAY button  
on (release) {  
if (\_root.mySlider.complete == 1) {  
\_root.mySlider.mySound.start(0,99);  
}  
}

* * *

and here is the STOP button  
on (release) {  
\_root.mySlider.mySound.stop();  
}

* * *

## and here is my Myslider vid clip (instance of my slider ) onClipEvent (load) { mySound = new Sound(); mySound.loadSound(“[http://www.angelfire.com/planet/xtudioexam/thisIsWar.mp3](http://www.angelfire.com/planet/xtudioexam/thisIsWar.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); }

and here is my Slider code  
this.ratio = 0;  
dragger.onPress = function() {  
this.startDrag(true,0,0,line.\_width,0);  
this.onEnterFrame = function() {  
ratio = Math.round(this.\_x\*100/line.\_width);  
\_root.volume = ratio;  
};  
};  
dragger.onRelease = dragger.onreleaseOutside=stopDrag;  
…

file is too large to include the FLA…sorry…but its basically the same code as

[http://www.kirupa.com/developer/mx/volume\_slider.htm](http://www.kirupa.com/developer/mx/volume_slider.htm)

…please help if can! ☹

i basically just want the music to start wen the page is loaded and for the volume to be halfway (50%)

Thank you,

Amy
