# Volume (retreival)

**URL:** <https://forum.kirupa.com/t/volume-retreival/142278>\
**Category:** Uncategorized\
**Created:** [March 27, 2005, 10:00am UTC](https://forum.kirupa.com/t/volume-retreival/142278 "2005-03-27T10:00:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nathan99](https://avatars.discourse-cdn.com/v4/letter/n/96bed5/32.png) [@nathan99](https://forum.kirupa.com/u/nathan99)\
**Post date:** [March 27, 2005, 10:00am UTC](https://forum.kirupa.com/t/volume-retreival/142278/1 "2005-03-27T10:00:35Z")

</div>

hey guys,  
I have this code where the player can set their volume;

```auto
 
var my_sound:Sound = new Sound();
my_sound.loadSound("C://Documents and Settings/me.my-comp/My Documents/My Music/Unknown Artist/Unknown Album (8-09-2004 10-55-17 AM)/my_song.mp3", true);
this.createEmptyMovieClip("knob_mc", this.getNextHighestDepth(),0,0,140,64);
knob_mc.left = knob_mc._x;
knob_mc.right = knob_mc.left+100;
knob_mc.top = knob_mc._y;
knob_mc.bottom = knob_mc._y;
knob_mc._x = my_sound.getVolume();
with (knob_mc) {
lineStyle(0, 0x000000);
beginFill(0x009933);
moveTo(0, 0);
lineTo(4, 0);
lineTo(4, 18);
lineTo(0, 18);
lineTo(0, 0);
endFill();
}
knob_mc.createTextField("volume_txt", knob_mc.getNextHighestDepth(), knob_mc._width+4, 0, 140, 64);
knob_mc.volume_txt.text = my_sound.getVolume();
knob_mc.onPress = function() {
this.startDrag(false, this.left, this.top, this.right, this.bottom);
this.isDragging = true;
};
knob_mc.onMouseMove = function() {
if (this.isDragging) {
	this.volume_txt.text = this._x;
}
}
knob_mc.onRelease = function() {
this.stopDrag();
this.isDragging = false;
my_sound.setVolume(this._x);
 
};
stop();

```

OK, now the catch, this code works fine, however, how would i make it possible for the volume level to be retreived in another frame and all the sounds in that frame are played at the set volume??
