Hey Folks,
greets to all ...
Maybe someone could help me out ...
I want to create a theme with an orb in the middle of the desktop (the wallpaper), with a main icon in the middle from which one can navigate to various catagories of applications and tasks (Graphics/Media Tools & MyComp/ControlPanel/ShutDown) etc ...
Basically I want to use the 'Sub Object_OnDrag(x, y, newX, newY)' statement, and be able to move the mouse to different locations to execute different tasks.
Eg: A wallpaper with an orb in the middle and a main logo/icon in the middle of that ... I want to the be able to click on the main icon which must fade out, and then for instance, if I move my mouse to the right, 'My Computer' fades in ... and if I move my mouse back to where it started, 'My Computer' fades out ... basically 'hotspots', but I'm running into a problem...
Well, here's the script I'm trying to use ... I'm using 2 objects, 'MAIN_ICON' and 'MY_COMP', and the movement is LOCKED on both of them ...
MAIN_ICON
---------
Function Object_OnLButtonDown(x, y)
Object.KillTimer 2
Object.SetTimer 1, 20
End Function
Function Object_OnLButtonUp(x, y, Dragged)
Object.KillTimer 1
Object.SetTimer 2, 20
End Function
Sub Object_OnDrag(x, y, newX, newY)
If System.CursorX > Object.Right + 64 Then
Call DesktopX.ScriptObject("my_comp").FadeIn
Else
Call DesktopX.ScriptObject("my_comp").FadeOut
End If
End Sub
Sub Object_OnTimer1
If Object.Opacity > 0 Then
Object.Opacity = Object.Opacity - 2
Else Object.KillTimer 1
End If
End Sub
Sub Object_OnTimer2
If Object.Opacity < 100 Then
Object.Opacity = Object.Opacity + 2
Else Object.KillTimer 2
End If
End Sub
Sub Object_OnScriptExit
Object.KillTimer 1
Object.KillTimer 2
End Sub
------------------------------------------
MY_COMP
Function FadeIn
Object.KillTimer 2
Object.SetTimer 1, 20
End Function
Function FadeOut
Object.KillTimer 1
Object.SetTimer 2, 20
End Function
Sub Object_OnTimer1
If Object.Opacity < 100 Then
Object.Opacity = Object.Opacity + 2
Else Object.KillTimer 1
End If
End Sub
Sub Object_OnTimer2
If Object.Opacity > 0 Then
Object.Opacity = Object.Opacity - 2
Else Object.KillTimer 2
End If
End Sub
Sub Object_OnScriptExit
Object.KillTimer 1
Object.KillTimer 2
End Sub
------------------------------------------
That script works ... but I want to be able to have more than one task going either direction ... I'd like to do something like this ... but it just gives me an error.
Hopefully someone can show me the light !!
------------------------------------------
Sub Object_OnDrag(x, y, newX, newY)
If System.CursorX > Object.Right + 64 & System.CursorX < Object.Right + 128 & System.CursorY > Object.Top - 20 & System.CursorY < Object.Bottom + 20 Then
Call DesktopX.ScriptObject("my_comp").FadeIn
Else
Call DesktopX.ScriptObject("my_comp").FadeOut
End If
End Sub
------------------------------------------
And ultimately something more like this ...
------------------------------------------
Sub Object_OnDrag(x, y, newX, newY)
If System.CursorX > Object.Right + 64 & System.CursorX < Object.Right + 128 & System.CursorY > Object.Top - 20 & System.CursorY < Object.Bottom + 20 Then
Call DesktopX.ScriptObject("my_comp").FadeIn
Call DesktopX.ScriptObject("my_docs").FadeOut
etc...
ElseIf System.CursorX > Object.Right + 192 & System.CursorX < Object.Right + 256 & System.CursorY > Object.Top - 20 & System.CursorY < Object.Bottom + 20 Then
Call DesktopX.ScriptObject("my_docs").FadeIn
Call DesktopX.ScriptObject("my_comp").FadeOut
etc...
End If
etc..., etc..., etc..., etc...
End Sub
------------------------------------------
Please, please, please, please, please can somebody help me ...
This is pretty much the general idea of what I wanna do ...
MAIN ICON >> CATAGORIES >> SHORTCUTS/MP3 PLAYER etc
Sorry about the long post ...
Thanks to those willing to read it through it all ... lol
Peace