Help with ... well ... just Help !!!

but why ??

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
4,255 views 6 replies
Reply #1 Top
Why not just use mouseover and mouse away states directly? And different images depending on the object state. These objects can be invisisble completely until you click your central Icon. Make these objects a group and have them be popups. You can yuse an animation sequence to create the fade effect.
Reply #2 Top
Hey BigDogBigFeet,

Thanks for the reply ...

I actually also wanted to be able to execute different apps depending on where the 'Function Object_OnLButtonUp(x, y, Dragged)' occurs ...

I'm not sure if your familiar with the MP3 player Foobar2000, and the FooLooks 'look' FooPilot ... but it has a similar functionality ... from one button ... you can:

single click >> play
click and drag left/right >> prev/next track
click and drag far left/right >> prev/next album
double click >> stop
right click >> pause
right click and drag down >> quit
etc .......

I wanted to get similar functionality ...

Click the main icon ...
and drag right for Design Apps ...
drag further right for M$ Office ...
left for Explorer ...
further left for my MP3 player (built in DesktopX) ...
up to navigate from eg: Graphics back to the main icon (root menu)

with the different icons fading in and out as you move the mouse ...

Also for instance, if you clicked the MP3 player's 'Play' icon and dragged it right, bringing up a 'Next' icon, I want it to execute the 'Next' command when releasing the mouse button but also fade out the 'Next' icon and fade the 'Play' Icon back in ... for another example

Hopefully you get the picture ...

But I'm also not asking you to make the theme for me ... lol
all I really need to know is how to make 'hotspots' for use with OnDrag and OnL/RButtonUp.

Thanks in advance ...
Reply #3 Top
Hey I like the concept.. not sure if I can get it but I like it?
Lemme get it right.. There's an Icon center screen, you want to be able to drag that icon to different icons on the screen that represent different categories (Progs,Media,Internet, etc) once the icon is place on the Category icon it opens a window (or some such) with different components for it?
Reply #4 Top
Sounds like all you need to do is check the Object.Top, Object.Left, Object.Right, etc corrdinates in your ondrag and your OnL/RButtonUp script. For example If Object.Top > 189 and Object.Top < 201 Then If Object.Left > 289 and Object.Left < 201 then VBScript statemnts doing fades and calling other functions, etc end if.
Reply #5 Top
COOL !!!

Thanks BigDogBigFeet !!!

So this is all that I needed to do ...

--------------------------------------

If System.CursorX > Object.Right + 64 And System.CursorX < Object.Right + 128 And System.CursorY > Object.Top - 20 And System.CursorY < Object.Bottom + 20 Then
Call DesktopX.ScriptObject("my_comp").FadeIn
Else
Call DesktopX.ScriptObject("my_comp").FadeOut
End If

--------------------------------------

I was using "&'s" and not "And's" ... lol

Anyway ...

Thanks again !!!

Reply #6 Top
I'd like to see this in action. Sounds like a really interesting interface.