# Volume dragger with percentage output, Help!

**URL:** <https://forum.kirupa.com/t/volume-dragger-with-percentage-output-help/294466>\
**Category:** flash\
**Created:** [August 14, 2009, 11:11am UTC](https://forum.kirupa.com/t/volume-dragger-with-percentage-output-help/294466 "2009-08-14T11:11:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_da\_best](https://avatars.discourse-cdn.com/v4/letter/m/90db22/32.png) [@Matt\_da\_best](https://forum.kirupa.com/u/Matt_da_best)\
**Post date:** [August 14, 2009, 11:11am UTC](https://forum.kirupa.com/t/volume-dragger-with-percentage-output-help/294466/1 "2009-08-14T11:11:48Z")

</div>

Im trying to make a volume bar that shows the volume percentage in a dynamic text box (with an instance of ‘percOutput’) while you are dragging. I cant even see how to do this, im having real trouble. :cantlook:

Here is my Actionscript:

```auto
 
myMusic = new Sound(this);
myMusic.attachSound("mySound");
//myMusic.start(0, 99); //auto start (remove commenting to activate)
slider.control._y = -50;
slider.control.onEnterFrame = function() {
 myMusic.setVolume(0-this._y);
}
slider.control.onPress = function() {
 startDrag(this, false, this._x, -100, this._x, 0);
}
slider.control.onRelease = function() {
 stopDrag();
}
stopButton.onRelease = function() {
 myMusic.stop();
}
playButton.onRelease = function() {
 myMusic.start(0, 99);
}

```
