The Oddest Thing....
MouseOver interaction with Volume
from
WinCustomize Forums
Ok So I'm making an MP3 controller in DesktopX.. I decide to use MouseOver interaction for the Volume control (MouseOver "+" Volume goes up, MouseOver "-" Volume goes down).. And this is what happened and I swear I'm not making this up.. When I set the Volume to go up by 1 each time it only gets to 16% Volume (If I use another method to turn up the volume and try again it goes to 36% and so forth), but it work fines if I'm taking 1 each time.. Here's the code:
:: This is for the "-" control
Sub Object_OnMouseEnter
Object.SetTimer 1, 1
End Sub
Sub Object_OnTimer1
If System.Volume <= 0 Then
System.Volume = 0
Object.KillTimer 1
Else
System.Volume = System.Volume - 1
End If
End Sub
Sub Object_OnMouseLeave
Object.KillTimer 1
End Sub
:: This is for the "+" Control
Sub Object_OnMouseEnter
Object.SetTimer 1, 1
End Sub
Sub Object_OnTimer1
If System.Volume => 100 Then
System.Volume = 100
Object.KillTimer 1
Else
System.Volume = System.Volume + 1
End If
End Sub
Sub Object_OnMouseLeave
Object.KillTimer 1
End Sub
It works fine having "+ 2" instead though!.. Any answers are welcome
:: This is for the "-" control
Sub Object_OnMouseEnter
Object.SetTimer 1, 1
End Sub
Sub Object_OnTimer1
If System.Volume <= 0 Then
System.Volume = 0
Object.KillTimer 1
Else
System.Volume = System.Volume - 1
End If
End Sub
Sub Object_OnMouseLeave
Object.KillTimer 1
End Sub
:: This is for the "+" Control
Sub Object_OnMouseEnter
Object.SetTimer 1, 1
End Sub
Sub Object_OnTimer1
If System.Volume => 100 Then
System.Volume = 100
Object.KillTimer 1
Else
System.Volume = System.Volume + 1
End If
End Sub
Sub Object_OnMouseLeave
Object.KillTimer 1
End Sub
It works fine having "+ 2" instead though!.. Any answers are welcome