# V's streaming player + knob control

**URL:** <https://forum.kirupa.com/t/vs-streaming-player-knob-control/88597>\
**Category:** Uncategorized\
**Created:** [April 30, 2005, 9:09pm UTC](https://forum.kirupa.com/t/vs-streaming-player-knob-control/88597 "2005-04-30T21:09:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hondo311](https://avatars.discourse-cdn.com/v4/letter/h/6a8cbe/32.png) [@hondo311](https://forum.kirupa.com/u/hondo311)\
**Post date:** [April 30, 2005, 9:09pm UTC](https://forum.kirupa.com/t/vs-streaming-player-knob-control/88597/1 "2005-04-30T21:09:54Z")

</div>

I have voetsjoeba’s streaming player [http://www.voetsjoeba.com/lab.php?i=8](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
