Smooth Button Fade using Hue & Timers Script
Sunday, September 24, 2006 by SirSmiley | Discussion: DesktopX
Complete script will be at the end of this post. First, we start with a basic red object:
Next we set up the hue settings When we load the object the colour would then be:

Next we will set up our state changes & the relevant timers:
Initial Fade will look like this:
Final Colour should be similar to this:
Dim hueAway
Dim hueOver
Dim hueDown
'Called when the script is executed
Sub Object_OnScriptEnter
hueAway = 100
hueOver = 124
hueDown = 135
'Sets Object Hue on load
Object.Hue = hueAway
End Sub
Sub Object_OnStateChange(state)
If state="Mouse over" Then
Object.SetTimer 100, 75
Else
If state="Mouse away" Then
Object.SetTimer 200, 75
Else
If state="Mouse up" Then
Object.Hue = hueAway
Else
If state="Mouse down" Then
Object.Hue = hueDown
End If
End If
End If
End If
End Sub
'Increase the hue until it reaches the hueover aka Target Mouse Over colour
Sub Object_OnTimer100
If Object.Hue => hueAway Then
If Object.Hue <=hueOver Then
Object.Hue = Object.Hue + 2
Else
Object.SetTimer 200, 75
Object.KillTimer 100
End If
End If
End Sub
'Decreases the hue until it returns to away state colour
Sub Object_OnTimer200
If Object.Hue => hueOver Then
Object.Hue = Object.Hue - 2
Else
Object.KillTimer 200
End If
End Sub
'Called when the script is terminated
Sub Object_OnScriptExit
Object.KillTimer 100
Object.KillTimer 200
End Sub
Basically, you end up with smooth slow fade. Now you should notice why I indicate this is a work in progress as the colours don't match up exactly due to the simplicity of the script. I'm working on a more advance version based on the sliding object script from the gallery and will post the object when or if completed.
Reply #2 Monday, September 25, 2006 11:49 PM
I would like to know where to get the sliding object script from, I happen to really be looking for one on a project I am working on. The smooth button I am savins the code for it. Way to go....
Thanks
Automan
Reply #5 Thursday, September 28, 2006 11:02 PM
The actual object I based mine on is called Hiding Menu and I'm not sure if I picked it up here or at a dx user/developer's site.
Reply #6 Friday, September 29, 2006 1:39 PM
Hey there! I appreciate you mentioning the developer site and the name of what you based this on. But I have maybe a stupid question for you?
Where is the dx user/developer's site?

I would really like to get in there and what topic or name do I use to find the Hiding Menu?
Thanks
Automan
Reply #8 Saturday, September 30, 2006 3:49 PM
Hey there, do you think that you can find your word.doc copy of it, it might turn out to be really use full.
Also I am still wondering on where the dx user/developer's site is located? I need to get there....
Thanks
Automan
Reply #9 Saturday, September 30, 2006 5:01 PM
Also, does anyone know if it would be considered copyright infringement if I uploaded my WordDoc copy of the DevGuide to a file sharing site?
Reply #10 Saturday, September 30, 2006 5:15 PM
Here is a link to the Wiki established by CerebroJD:
http://scratchpad.wikia.com/wiki/DesktopX
There are *.doc versions of the User's Guide and Scripting Guide available from this page:
https://www.stardock.com/products/desktopxenterprise/resources.asp
Don't let the "Enterprise Edition" scare you, these guides are useful for all versions, BUT!!! these are older files, and DO NOT have all the newest info on the newest DX features that you'll get from :
https://www.stardock.com/products/desktopx/documentation/index.html
You could probably save the HTML version to your hard disk if you are wanting to work offline.
DX discussions have flared up at Aqua-Soft, Stardock.com forums, deviantArt, DesktopGadgets.com, and some of the smaller customization sites whose names escape me (sorry guys), but I don't know of any sites specific to DX development. Unless: https://www.stardock.com/products/desktopx/development.html
Reply #11 Friday, October 6, 2006 11:14 AM
Edit: Found it. Some times the simplest search term is easier ("Hide")
Called "Taskbar Style AutoHide Sample" by Tombalaci
Please login to comment and/or vote for this skin.
Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:
- Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
- Access to a great community, with a massive database of many, many areas of interest.
- Access to contests & subscription offers like exclusive emails.
- It's simple, and FREE!







Reply #1 Monday, September 25, 2006 9:44 AM