PDA

View Full Version : Bent slider...possible?



speedy_rudolf
September 21st, 2009, 07:36 AM
Hi. I have searched google for about an hour, and found nothing...so here I am :D
Ok...My question is this: Is it possible to make a bent percentage slider? Something like this http://www.agavegroup.com/?p=28 only I want it to be a 20px wide rectangle bent at about 330 degrees. (And it would be best if it wouldn't be like most "knob" sliders...that is, slide only when the mouse is moved up/down or left/right, but in both directions, making the user stay "on track")

And how can I make the slider background change behind the handle?
Also, can it be made to "jump" on onclick events? (if the user clicks, let's say, at 5%, the handle jumps to 5%, then, if the user hasn't released the mouse button, make the slider follow the mouse)

Any help is very much appreciated. Thank you. Bye.

jloa
September 21st, 2009, 09:54 AM
Greets.
Isn't that the default skinned "fl.controls.Slider" class instance?

Is it possible to make a bent percentage slider?
Well the "fl.controls.Slider" class has two properties "minimum" and "maximum". The default values are 0-10, but u r free to change them from 0 to 100 - voila, the percentage slider.
Speaking of rotation - use the "rotation" DisplayObject method. Design - skin it.
And the Slider class also dispatches events.

But if u need some specific animation (transition, tween or what ever u call it), u'll have to write yr own class, i think.

speedy_rudolf
September 21st, 2009, 10:30 AM
Greets.
Isn't that the default skinned "fl.controls.Slider" class instance?

Well the "fl.controls.Slider" class has two properties "minimum" and "maximum". The default values are 0-10, but u r free to change them from 0 to 100 - voila, the percentage slider.
Speaking of rotation - use the "rotation" DisplayObject method. Design - skin it.
And the Slider class also dispatches events.

But if u need some specific animation (transition, tween or what ever u call it), u'll have to write yr own class, i think.

ok...I know that...but the key word in that frase was "bent"...can the slider be bent? (to look like a hemisphere or even an entire sphere or something like that) If so, what is the code to make the slider only work as long as the mouse is on top of it? (the mouse has to follow the slider "path" for it to work)
thanks