DesktopX script to control state.

Hello

Would you pls help me with desktopx script. an script that control state of another object.

Suppose if i mouse over on button 1, Target object will show have state 1.  & i mouse over on button 2, Target object  will have state 2 and so on for FOUR buttons and states.if i don't mouse over on any no states will be visible.

thank you everyone. :andrew:

 

9,483 views 5 replies
Reply #1 Top

You can use OnMouseEnter and OnMouseLeave:

 

Sub Object_OnMouseEnter
 DesktopX.Object("Target").state = "state1"
End Sub

Sub Object_OnMouseLeave
 DesktopX.Object("Target").state = "Default"
End Sub

 

You would have to do this for each button, making sure to change "state1" to whatever state is supposed to be shown on mouse enter. "Default" state should be changed to whatever state you want showing when no buttons are moused over.

 DX Scripting Reference

+1 Loading…
Reply #2 Top

rocking sViz!..

Reply #3 Top

Thanks sviz for this, and scripting link. it will sure help me  i will need to have four scripts in respective buttons right? or can i combine them into one?

 

Reply #4 Top

No problem. Yep, you'll need a script in each button.

Reply #5 Top

Actually you can make a master object and put 1 code block in there, its a little more complicated, but it does work.