DesktopX 2.4x bug reports
No..not us?
Wednesday, February 2, 2005 by Frogboy | Discussion: Bug Reports
Let us know which "undocumented features" in the latest DesktopX builds you've run into.
Please make sure you let us know which precise version you're running (i.e. released version, beta, or alpha).
Thanks!
Reply #22 Monday, March 7, 2005 3:37 AM

Reply #23 Monday, March 7, 2005 9:20 AM
| I decided to totally rewrite the code to see if I could escape this weird bug, but still no luck. Button object (this script belongs to Button) is contained by object named ButtonBack. I need all 3 states to be in same picture, so I designed it so picture moves up or down to proper state. The problem is that when it moves up to proper pressed state, it moves ButtonBack up by same amount! Very, very annoying. |
I don't understand why you have this requisite: >I need all 3 states to be in same picture
I can try fixing the bug - DX is probably detecting the changed mouse position after movement (between a down and up event) as a mouse dragging, however it is really a dirty solution, since with DX3 you can just use scriptable animations.
Have all "sub-states" as frames in one single state and use Object.CurrentFrame.
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!







Reply #21 Thursday, February 24, 2005 5:33 PM
To recreate this problem, just create a solid magic pink picture of any size, use this for ButtonBack. Create a object named Button and make it a contained child of ButtonBack. Add this entire script to Button. If you want button to be square, make sure picture assigned to Button is 3 times as tall as it is wide.
When it's done and script is running, mouse over it. It should change (if you made Button picture solid single color you can't see it change.) to hover mode. It doesn't move parent up however. Now, press left button and hold. It changes to clicked mode, and somehow moves parent object up too. Let mouse button go and it stays there but it changes to normal mode.
Things I have tried:
Another object on front accepting clicks and sending messages to change state. No luck.
Timer that checks for a var that changes to 1 then changes to pressed state. No luck.
'Called when the script is executed
Dim Thirdsize
Sub Object_OnScriptEnter
Thirdsize=object.Height/3
Desktopx.Object("ButtonBack").width=object.width
DesktopX.Object("ButtonBack").Height=Thirdsize
End Sub
Sub Object_OnStateChange(state)
If state = "Mouse down" Then
Controlmode 1
ElseIf state = "Mouse up" Then
Controlmode 0
ElseIf state = "Mouse over" Then
Controlmode 2
ElseIf state = "Mouse away" Then
Controlmode 0
End If
End Sub
Sub Controlmode(Mode)
' Mode 0: normal; Mode 1: Click; Mode 2: Hover
If Mode=0 Then
Object.top=0
ElseIf Mode=1 Then
object.top=-Thirdsize
ElseIf Mode=2 Then
object.top=-Thirdsize * 2
End If
End Sub