Forum Moderators: open

Message Too Old, No Replies

flash-ish mouseover pushes menu along thing

         

distorto

9:27 pm on Jan 4, 2008 (gmt 0)

10+ Year Member



posting an example would probably help a lot here, but I have been asked to do a menu for a client that moves from right to left or left to right depending on where your mouse is *on the menu*. In other words, the menu is a long straight bar composed of images. The bar is longer than the page. To see the parts of the bar that are beyond the end of the page, you move your mouse in the direction you want to see and the menu responds by moving obligingly in the desired direction. Many times, there's an increase in velocity when you move the mouse farther to one direction.
Can this be done with Javascript? If so, how do you refer to it and are there libraries that feature this sort of effect? I have had no luck searching for these sort of effects in scriptaculous and the other popular libraries.

Trace

2:13 pm on Jan 7, 2008 (gmt 0)

10+ Year Member



I suggest you start with something along these lines;
[dynamicdrive.com...]

And instead of firing the event when you mouseover the left/right arrows, do it with cursor position. More precisely, calculate how far the cursor is from the center of the menu and move the menu incrementally in the right direction.

Hope that helps.

distorto

3:31 pm on Jan 7, 2008 (gmt 0)

10+ Year Member



hey thanks. I was afraid I explained this badly. I can see how this can be done...I was just really hoping there was already functionality to do this sort of mouse position=action mapping in one or more of the common js libraries out there. Maybe not.
anyways, thanks!

Dabrowski

3:45 pm on Jan 7, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hey distorto, did you manage to fix this?

If not I'll have a go, sounds like fun!

distorto

4:48 pm on Jan 8, 2008 (gmt 0)

10+ Year Member



I haven't had a chance yet.
if you send me a message I can send you an example of a flash site that I'm modeling this after.

Dabrowski

7:04 pm on Jan 15, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



ok, I've made a start.

I've done a simple, pure HTML (with a little SSI for CGI) image gallery. Completely cross browser and degradable (works without any JS). The images, when clicked, open in a new popup window.

That sound about right?

ok, the next step is to javascript-ise the gallery, to auto-scroll the image thumbnail gallery, and when clicked I'm going to use a DIV overlay to pop the image up. That way popup blockers won't get in the way.

Is that about what you want?