Skip to main content
Participant
June 13, 2014
Question

actionscript for dimming knob

  • June 13, 2014
  • 1 reply
  • 315 views

I currently have a volume knob that works with sound and turns 360 Deg. I now want to use this rotary knob to control the brightness of an image/symbol.

Please help

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
June 13, 2014

Find a tutorial on how to control brightness (search Google using terms like "AS3 brightness control") and then figure out how to manipulate the rotation property of the knob to give you the control values.  Here is a link to one of the results of that search...

http://code.tutsplus.com/tutorials/create-a-brightness-editor-in-actionscript-3--active-3438

If you were to follow it, you would see that a slider is used with values ranging from -150 to +150.  What you could probably do is make use of the rotational value (degrees) of the knob relative to 180 degrees getting a -180 to +180 range, meaning take the rotational value and subtract 180 from it for the brightness factor.