scripting color
hue shift
Saturday, June 14, 2008 by PuterDudeJim | Discussion: DesktopX Tutorials

'Called when L-click is released
Function Object_OnLButtonUp(x, y, dragged)
If Not dragged Then
'Store the current hue in variable
hueshift = Object.hue
'If current hue is equal to or greater than 255
'reset to 0
If hueshift => 255 Then
hueshift = 0
'If hue is not yet 255, keep adding
Else
hueshift = hueshift + 7
End If
'Set the object hue
object.hue = hueshift
End If
End Function
Reply #22 Tuesday, June 17, 2008 10:15 AM
Reply #23 Tuesday, June 17, 2008 12:06 PM
Reply #24 Tuesday, June 17, 2008 8:55 PM
Probably. It's a bit too complicated for me. Thanx tho.
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 #21 Tuesday, June 17, 2008 5:27 AM
1. Create new object and name it like "sound".
2. Create a few states in this object:
disable <-- The first state. Do nothing here!
Add your *.wav files to the other states: tab "States" --> tab "Sound" --> button "Browse" --> button "Apply"
Restore <-- Windows Restore.wav
LowBattery <-- Windows Battery Low.wav
CriticalStop <-- Windows Critical Stop.wav
Logon <-- Windows Logon Sound.wav
Minimize <-- Windows Minimize.wav
Now you have a special object with all of the necessary sounds.
3. Coppy this code to your button:
Function Object_OnLButtonUp(x, y, dragged)
If Not dragged Then
Dim sfx : sfx = desktopx.object("sound").state
Select Case sfx
Case "disable" '<== Silent (no sound)
sfx = "Restore"
Case "Restore" '<== Windows Restore.wav
sfx = "LowBattery"
Case "LowBattery" '<== Windows Battery Low.wav
sfx = "CriticalStop"
Case "CriticalStop" '<== Windows Critical Stop.wav
sfx = "Logon"
Case "Logon" '<== Windows Logon Sound.wav
sfx = "Minimize"
Case "Minimize" '<== Windows Minimize.wav
sfx = "disable"
End Select
desktopx.object("sound").state = sfx : Set sfx = nothing
End If
End Function
Press your button again and again to hear each of your sounds one after another.
4. Now you just need to write a simple code which will control your sounds...
Have a nice day with DesktopX.