DesktopX script to control state.

Tuesday, October 13, 2009 by swapna alice | Discussion: DesktopX Tutorials


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.


Reply #1 Tuesday, October 13, 2009 12:40 PM

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

Reply #2 Wednesday, October 14, 2009 7:38 PM

rocking sViz!..

swapna alice
Reply #3 Thursday, October 15, 2009 5:37 AM

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 Thursday, October 15, 2009 11:31 AM

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

Reply #5 Thursday, October 15, 2009 6:46 PM

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

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!