anybody know how to make a custom hslider in Flex 4 (spark) with two thumbs? Since Flex 4 the thumbcount property of the slider component isn’t longer available (at the mx component it was easily to set). I have to style the track and the thumbs.
A tutorial would be nice.
thx,
tux.
I don’t have a full tutorial for you but here are the first few steps in creating a custom hslider component. Hope it helps.
Start by looking at the hslider skin which is made up of 2 parts, a thumb and a track:
Now, create a new skin except give it two buttons:
Create a new component that extends HSlider and call it something like MultiButtonSlider. Override the partAdded() function and grab a reference to thumb2 when its added.
Hope this starts you off in the right direction. Don’t forget to set the MultiButtonSlider.skinClass = “YourNewSkin”
Next steps would be to make it draggable and convert its point to a value. See the HSlider.pointToValue() function.