MinimalComps: RangeSlider

I know I’m supposed to stop making new components and clean things up for 1.0, but this got in my head and I had to bang it out. It’s basically a slider with two handles. You get a lowValue and a highValue. Good for specifying a range with a low and high boundary. I thought it was pretty important to have labels for the two values, but wasn’t sure the best way to do it. Finally came up with these sliding labels that match the position of each handle. They can be always on, always off, or just show up when you move the handles. You can also specify the position of the label.

[kml_flashembed publishmethod=”static” fversion=”10.0.0″ movie=”http://www.bit-101.com/blog/wp-content/uploads/2010/04/RangeSlider.swf” width=”401″ height=”200″ targetclass=”flashmovie”]

Get Adobe Flash player

[/kml_flashembed]

Shown here is the HRangeSlider. There’s also a VRangeSlider which works about as you’d suspect.

The code is checked into SVN. Will update the site, SWC, docs, and code download later, probably tomorrow.

This entry was posted in ActionScript, Components. Bookmark the permalink.

8 Responses to MinimalComps: RangeSlider

  1. Tim says:

    Wow. You are amazing. This has gotten to the point where I want a Flash project just to use these components. Thanks!

  2. Hey man, you are doing great job with that components, keep going! Congrats

  3. manny says:

    kick ass, you are officially my new best friend!

  4. Paul Forest says:

    Awesome, nice n’ slick!

    Would be nice if when you move one slider past another, you move the other slider as well.

    Example, using ascii art:

    Starting condition:
    ..[….]…

    Sliding the right-most slider just to the edge of the left works as normal:

    ..[]…….

    If you continue sliding the right slider to the left, you should also move the left slider to the left:
    []………

    And perhaps have a way to lock each slider in position.

  5. Sweet! I Had to come up with this kind of component for my app (http://www.psykopaint.com). But i think a simple 2 cubes on the same line is really good. Little suggestions would be to highlight the area in between those 2 sliders, and make the left to right sliding of the left one push the right one forward,vice & versa

  6. diego says:

    For the administration section of the website i’m working on, i’ll use minimalcomps for the first time. I’m excited!! 😀

  7. Innes says:

    Peter, I’d really like to thank you for your contribution to the Actionscript community. I am very new to Actionscript (I code solely using FlashDevelop) and, having coded in VB for many years, I learnt AS3 almost solely from your excellent “Making Things Move” book; it truely is one of the best technical books that I have ever read; clear, concise and entertaining.

    Your Minimal Components have also inspired me in my coding, and I have learnt a great deal from the source code. Having been a ‘techie’ for two decades, I now teach ICT in a secondary school (ages 11-16) in the UK, and I have, for the past few months, been struggling to create engaging Flash learning resources for my students. With the knowledge I have gained from your book, and the tools that you have generously provided free of charge, I am now equipped to create some useful learning tools for my students, and have made excellent progress in the last two weeks alone. I hope to be able to share my resources when they are of good enough quality.

    I was amused to find that you authored “Falling Balls” which my 14 year-old son has installed on his iPod Touch. Well done with the success of that game, and please ignore those who criticise you for attempting to monetise it. You have contributed greatly to the developer community, and you deserve financial reward.

    Once again, thanks, and good luck with your future coding endeavours.

Leave a Reply