This blog has moved to a new location!

Saturday, December 5, 2009

Simple AS3 VolumeKnob component

An entire month went and not a single post... Sadly, there is a lot of valuable information I learn that I don't put on my blog, which I should, I just never get around to it.

I still haven't written any documentation for it, but I thought I'd throw this out there in case there is anyone else trying to create the same effect.

Pass in a DisplayObject as the "knob", and when the user holds down the mouse and drags around, the volume will increase when rotated to the right, and decrease when rotated to the left.

It is "continuous", like those digital volume knobs, where you can turn without limit left and right, and even if volume is all the way down to 0, you can still keep turning left etc.

Files stored here:
The ZIP contains the class (src/ and one simple example file (src/ as well as a compiled SWF in the bin directory.
(Thanks to a very helpful donor for the webspace!)

Better description, ASDoc, and examples to come. Refer to comments inside of AS file for more details until then.

Feel free to use and distribute the class freely, but NEVER pass it on as your own work telling others you made it. PLEASE tell me if you end up using it for any projects. It's not a requirement, but it I would like it.

No comments:

Post a Comment