I have voetsjoeba’s streaming player http://www.voetsjoeba.com/lab.php?i=8
which i modified slightly. I want to control volume with a knob instead of a slider.
my player is attached.
here is the code for the knob:
r0.speed = Math.random()-.5;
r0.onPress = doDrag;
r0.onRelease = noDrag;
r0.onReleaseOutside = noDrag;
r0.onEnterFrame = move;
function doDrag() {
this.drag = true;
var dx = _xmouse-this._x;
var dy = _ymouse-this._y;
this.angle = Math.atan2(dy, dx);
}
function noDrag() {
this.drag = false;
}
function move() {
if (this.drag) {
var dx = _xmouse-this._x;
var dy = _ymouse-this._y;
var newAngle = Math.atan2(dy, dx);
this.speed = newAngle-this.angle;
this.angle = newAngle;
this._rotation += this.speed*180/Math.PI;
_root.rot = this._rotation;
}
}
thanks for your help!!!
peace,
hondo311