Smooth out movement of script in DesktopX
Does anyone know how to smooth out the movement of a script in DX? It's hidden & when it rolls down from the top it's always kind of jerky. Anyway to smooth out? Any suggestions?
Does anyone know how to smooth out the movement of a script in DX? It's hidden & when it rolls down from the top it's always kind of jerky. Anyway to smooth out? Any suggestions?
What script use Richard?
Here it is...
Sub Object_OnScriptEnter
desktopx.Object("panel_back").top = -360
End Sub
Sub Object_OnStateChange(state)
If state = "Command executed" Then
DesktopX.Object("panel_back").Visible = True
End If
End Sub
Function Object_OnLButtonUp(x, y, Dragged)
If Dragged = False Then
If desktopx.Object("panel_back").top = 0 Then
object.KillTimer 10
object.SetTimer 20,8
Else
object.KillTimer 20
object.SetTimer 10,8
End If
End If
End Function
Sub object_ontimer10
If desktopx.Object("panel_back").top < 0 Then
desktopx.Object("panel_back").top = desktopx.Object("panel_back").top + 8
Else
object.KillTimer 10
End If
End Sub
Sub object_ontimer20
If desktopx.Object("panel_back").top > -360 Then
desktopx.Object("panel_back").top = desktopx.Object("panel_back").top - 8
Else
object.KillTimer 20
End If
End Sub
Try changing the above to: desktopx.Object("panel_back").top = desktopx.Object("panel_back").top + 2 also change
to: desktopx.Object("panel_back").top = desktopx.Object("panel_back").top - 2
That should improve the smoothness. You can also reduce the number to 1 instead of 2.
Yeah, agree with BDBF, that should work ![]()
Thanks guys..
thats the key or make the timer faster if that is too slow
Welcome Guest! Please take the time to register with us.