im having problems makin a volume slider…
//----------------------------------------
loader.scrub.left = loader.scrub._x;
loader.scrub.right = loader.scrub.left+100;
loader.scrub.top = loader.scrub._y;
loader.scrub.bottom = loader.scrub._y;
loader.scrub._x = playerSound.getVolume();
volume_txt.text = playerSound.getVolume();
loader.scrub.onPress = function() {
this.startDrag(false, this.left, this.top, this.right, this.bottom);
this.isDragging = true;
};
loader.scrub.onMouseMove = function() {
if (this.isDragging) {
volume_txt.text = this._x;
}
};
loader.scrub.onRelease = loader.scrub.onReleaseOutside=function () {
stopDrag();
isDragging = false;
playerSound.setVolume(this._x);
};
//----------------------------------------
the volume keeps being displayed as 43 to 143
or -173 to 21 depending where I put the MC on the stage
what am i doin wrong?