Some favorite site feeds aggregated locally: iPhone Development RSS   Adobe Labs RSS   Macrumors RSS

Wednesday, July 8, 2009

AS3 range slider with multiple thumbs?

Wednesday, July 8, 2009   

Update 2:
Here is a quick example of the working component as it stands right now. Implements setting thumb positions and all that jazz.

I started coding up an AS3 quasi-component and it's working pretty well. It's kind of hard-coded for my immediate needs, but I may just release it so you can implement custom events for it and roll it as a proper component.

It doesn't look like the sample below, the thumbs carry along their current value based on the max value set for the whole slider, use color-coded sections to better help visualize, etc.

If I get some spare time, I'll probably roll it into a proper component since it's not too hard but rather time-consuming. As most things I suppose.

If you are at all interested in using a range (partition) slider outside of Flex (that doesn't require Flex at all), then you may want to pay a little extra attention to this blog in the near future.

I've seen sliders, I've seen Flex sliders with two thumbs, but I have yet to see a slider that has more than two thumbs. I've been searching all over the place and I just haven't found one yet. I was hoping to locate one to save me the time and energy of coding one up myself from scratch. It's not terribly difficult, just really time consuming.

If you've seen one of these around, please let me know. I am hoping to save development time for my actual application and not having to cut out some of that time to create a multi-range slider.

Yes, I know the use case for a slider that can support 2+ thumbs is rare. Any help would be appreciated.

Here is an image of a component I already started:
How I imagine it. The slider has a base min and max. Defaults to 1 thumb maybe. You can add thumbs and when you do you specify a value for it's initial placement.

To make it easy, any time any of the thumbs are moved, values for all are set for the change event, in the order of the thumbs, say an array of values. You can't drag a thumb over another thumb.

Labels: , ,

 Return to the main page

There are currently 11 Comments:

Anonymous Campbell said...
“flexlib has one”
Blogger e.dolecki said...
July 9, 2009 6:28 AM
“I need more than 2 thumbs - I think that only supports 2 but I'll look into it, thanks.”
Blogger e.dolecki said...
July 9, 2009 8:29 AM
“Oops - I see that you can use 3 thumbs for that flexlib one. I'll definitely check into that now. Thanks again.”
Blogger gmitchel850 said...
July 25, 2009 9:56 PM
“Very nice. I would be very interested in a horizontal slider with four thumbs. That way a range of values for the minimum and for the maximum could be entered.”
Blogger e.dolecki said...
July 25, 2009 10:56 PM
“gmitchel850 - that would be easy - in fact, this supports as many sliders as you can normally fit without it being ridiculous.”
Blogger gmitchel850 said...
August 2, 2009 8:31 PM
“I am *VERY* interested in this control.

When will it be ready? I'd be willing to help you beta test it.”
Blogger Steve said...
September 24, 2009 10:51 AM
“This is exactly what I have been looking for. My need is to partition a dataset from the min value to max using any number of bins/buckets. This controls use of thumbs does it perfectly.

You mentioned: "If you are at all interested in using a range (partition) slider outside of Flex (that doesn't require Flex at all), then you may want to pay a little extra attention to this blog in the near future."

I use Google Web Toolkit (java and javascript) and would love to incorporate this into my program. Does this component work with GWT/Javascript?”
Blogger mohan said...
January 9, 2010 2:02 AM
“i need the same,can you please give me the code how to acheive the same..
Anonymous Anonymous said...
January 27, 2010 4:48 PM
“I would love to get my hands on this. Can you post the code somewhere?”
Anonymous Anonymous said...
February 15, 2010 9:43 AM
“can you please provide us with the flex code for this multiple thumb component.It would be more helpful-Pavan”
Blogger Prasad said...
February 22, 2010 11:42 PM
“Hi can you send me the code of this program i need to use in my application”
 Leave a comment