I am very new to dx and scripting, so bare with me. I have a button that when pushed a tray slides out (called target6). On target6 there is another button that when pushed will open another tray called target9. Now when i push the original button that opens and closes target6, I would like it to not only close target6 but also target9. I don't want the main button to open target9 just close it. Here is just the script attached to the main button. Works perfectly. I have tried adding in just the closing portion of the script for target9 and it works, but it only works for target9 and not target6. Help Please.
[code]
'Called when the script is executed
Sub Object_OnScriptEnter
End Sub
'Called when the script is terminated
Sub Object_OnScriptExit
End Sub
Sub Object_OnScriptEnter
desktopx.Object("Target6").top = 0
End Sub
Function Object_OnLButtonUp(x, y, Dragged)
If Dragged = False Then
If desktopx.Object("Target6").Left = 0 Then
object.KillTimer 100
object.SetTimer 200,10
Else
object.KillTimer 200
object.SetTimer 100,10
End If
End If
End Function
Sub object_ontimer100
If desktopx.Object("Target6").Left < 0 Then
desktopx.Object("Target6").Left = desktopx.Object("Target6").Left + 5
Else
object.KillTimer 100
End If
End Sub
Sub object_ontimer200
If desktopx.Object("Target6").Left > - 300 Then
desktopx.Object("Target6").Left = desktopx.Object("Target6").Left - 5
Else
object.KillTimer 200
End If
End Sub
[/code]