The scripts are based on the DesktopX Developer’s Guide tutorial for "Scrolling Content". I’ve made some moderations.
First we want to create 3 objects.
1. test_object- this is the object of which we will be changing the hue
2. slider_bar- self-explanitory, I think.

3. slider_button- where we will be putting the script

Now, we need to make the slider_bar object… well ….a bar! So use a solid colored image and set that as the object’s image.
Next, we need to make the slider_bar object a rectangle. Not just any rectangle, because the width is very important. Set the object’s height to 30 and the width to 260.

Now, we make the slider_button. It’s no biggy what you use as an image; I’m cheap so I’m using the default image.
The slider_button object needs to be at maximum the same height as the slider_bar (30) and it needs to be 5 pixels in width.
Set the slider_button parent to the slider_bar, (I bet you already knew that), and set top position and left position to 0.

Look out! I’m about to throw a script at ya’!
Dim left_pos
Dim right_pos
Sub Object_OnScriptEnter
left_pos=0
right_pos=255
desktopx.object("test_object").hue= object.Left
End Sub
Sub Object_OnDrag(mousex,mousey,newposx,newposy)
Object.top = Object.top
If newposx (<) left_pos Then Object.left=left_pos '--Take out the parenthesis from the less than sign
If newposx>right_pos Then Object.left=right_pos
desktopx.object("test_object").hue= object.Left
End Sub
Put that script into your slider_button object and you’re good to go.
Now you can go have fun with your hue slider!
BUT WAIT THERE’S MORE!
If you’re like me and don’t have room for a 260 wide object. You’ll want your slider a little smaller. A little division and multiplication can solve this.
First, to get the new length of the slider_bar I divide the total hue shift by 3 and then add the width of the slider_button.
255/3 = 85 + 5 =90
Our new slider_bar width is 90
Now we insert this newly adjusted script…..
Dim left_pos
Dim right_pos
Sub Object_OnScriptEnter
left_pos=0
right_pos=85
desktopx.object("test_object").hue= object.Left*3
End Sub
Sub Object_OnDrag(mousex,mousey,newposx,newposy)
Object.top = Object.top
If newposx (<) left_pos Then Object.left=left_pos '--Take out the parenthesis from the less than sign
If newposx>right_pos Then Object.left=right_pos
desktopx.object("test_object").hue= object.Left*3
End Sub
You’ll notice that the right_pos has changed and we multiply object.left times 3 to get the correct hue shift amount.
HOLD ON WE’RE NOT DONE YET!!
You can make this slider even smaller. Again you can divide the total hue shift down so long as the sum is a whole number (i.e. no decimal numbers).
Dividing 255 by 5 will get you a slider_bar 51 in width. All you have to do is add the width of the slider_button to the width of the slider_bar, adjust the right_pos, and multiply object.left by 5.
That’s it! Thanks for reading. Let me know what you think.
***For some reason the post would not accept the 'less than' sign so I put them in parenthesis. Make sure you remove the parenthesis form the less than sign when you insert the script.***