Po Smedley's toggle question
Tuesday, June 20, 2006 by sViz | Discussion: DesktopX
Try this:
1.Set Object B visible to "NO"
2.Insert script below in object A
3.Insert script below in object B but change
desktopx.Object("B") to desktopx.Object("A")
If object.Visible= True Then
desktopx.Object("B").visible= False
ElseIf object.Visible= False Then
desktopx.Object("B").visible= True
End If
Sub Object_OnLbuttonUp(x,y,dragged)
If Not dragged Then
desktopx.Object("B").visible= True
object.visible = False
End If
End Sub
Hope this helps.
EDIT: You can also use messages.
1. Create a 'mouse up' state for object A
2. In the 'mouse up' state add a message to 'hide' object A and 'show' object B.
3. Do the same for object B (i.e. hide B and show A)
Reply #2 Wednesday, June 21, 2006 8:14 AM
Apologies for the lack of line breacks and extra clicking to see the photos.
Poor forums.
Reply #3 Wednesday, June 21, 2006 8:14 AM
Wow. Almost nothing in the Dev guide. Here are two objects A and B. I grouped them. Here is Objcet A states tab:
Now we add a Mouse down state and add a message to send a Hide state to object B
So we get this:
Add a state to object B called Hide and set that state to do something (I had it change color)
And there you have it:

Reply #4 Wednesday, June 21, 2006 6:43 PM
Reply #5 Wednesday, June 21, 2006 8:20 PM
Reply #6 Wednesday, June 21, 2006 9:15 PM
What happens when both objects are not set as Visible on the Relations tab? Will your toggle work then?
I once had an object that I wanted to show on the screen on load then fade out after three seconds or so. Then be accesible through the system tray.
If you know any scripting like that+, I'd love to see it. 
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 #1 Wednesday, June 21, 2006 7:07 AM