DX 2 Question.

Tuesday, October 28, 2003 by Dreamdesign3d | Discussion: Stardock Software

I was wondering if it is possible to make Hot Spots on a DX 2 object? So if I wanted you to be able to click on different parts of the object to do different tasks.
pjpowell
Reply #1 Wednesday, October 29, 2003 3:00 AM
It's not a feature of DesktopX but can be done using DXScript. You would need to have something like:

Sub Object_OnStateChange(state)

End Sub
pjpowell
Reply #2 Wednesday, October 29, 2003 3:00 AM
It's not a feature of DesktopX but can be done using DXScript. You would need to have something like:

Sub Object_OnStateChange(state)
If State = "Mouse down" then
if system.cursorx > FirstHotSpotLeft and _
system.cursorx < FirstHotSpotRight and _
system.cursory > FirstHotSpotTop and _
system.cursory < FirstHotSpotBottom then
' It's in the 1st hot spot so do something
end if
end if
End Sub

In the example above you would swap the FirstHotSpotLeft/Right etc with the actual values. If you were calling it so many times you would probably want to set up a function called CheckHotspot which you could call very simply and returned a True/False depening on if it was in the hotspot.
[Message Edited]

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!



web-wc01