Layer Genie Support Product Page

This topic is locked
This topic was archived

Inserting a Pause before showing layer

Asked 06 Feb 2004 11:58:19
1
has this question
06 Feb 2004 11:58:19 Andrew Halliday posted:
Hi,
Have been using this great extension for some time now but have been asked by a client if there is a way of inserting a pause onmouseover before showing the new layer and 'losing' the previous one.
An example of the effect they want is on the macromedia main site www.macromedia.com
If you put your mouse over the first menu item, the sub menu item appears. Then if you move your mouse (even quite slowly) to the right, another menu doesn't appear unless you are over the button for a period of time.
I realise that this is probably written in flash or something but is there a way to get Layer Genie to do something similar?
Thanks a lot
Andrew Halliday

Replies

Replied 06 Feb 2004 14:06:16
06 Feb 2004 14:06:16 Marja Ribbers-de Vroed replied:
Layer Genie can't do this by default, but you can easily do this yourself by manually modifying the code in your page.
You would use the JavaScript function setTimeout() to delay the triggering of Layer Genie.

Note however that the complete Layer Genie function call would need to be passed as a string to the setTimeout() function, and that means that the Layer Genie function call would not be editable anymore using the extension dialogs.

Hope this helps.

--
Marja Ribbers-de Vroed
www.flevooware.nl
www.flevooware.nl/dreamweaver/


Edited by - MarjaR on 06 Feb 2004 14:06:39
Replied 06 Feb 2004 14:57:09
06 Feb 2004 14:57:09 Andrew Halliday replied:
Hi again, thanks for your prompt response. Do you have any examples of where something similiar has been used?
Replied 06 Feb 2004 15:06:54
06 Feb 2004 15:06:54 Marja Ribbers-de Vroed replied:
A typical Layer Genie function call looks something like this in your code:
<pre id=code><font face=courier size=2 id=code>&lt;a href="javascript:;" onMouseOver="dmxFLG1('divMenu1',1,1,'',2,'imgMenu1',1,146,0,1,10,0,-150,0,1,2,1,0,0)"&gt;</font id=code></pre id=code>

You would have to change that to something like:
<pre id=code><font face=courier size=2 id=code>&lt;a href="javascript:;" onMouseOver="setTimeout('dmxFLG1(\'divMenu1\',1,1,\'\',2,\'imgMenu1\',1,146,0,1,10,0,-150,0,1,2,1,0,0)', 500)"&gt;</font id=code></pre id=code>
This will delay the triggering of the dmxFLG1() call with 500 milliseconds.

--
Marja Ribbers-de Vroed
www.flevooware.nl
www.flevooware.nl/dreamweaver/
Replied 06 Feb 2004 16:45:03
06 Feb 2004 16:45:03 Andrew Halliday replied:
Hi thanks for this example - I've got it to work now, however it's not quite what I was hoping for. Now, if the mouse moves over say 3 menus before stopping on the required one, all of the sub menues from the 3 you skipped over, briefly pop up, before the required one. I think what I need is a onMouseOverSlowly rather than OnMouseOverQuickly <img src=../images/dmxzone/forum/icon_smile_wink.gif border=0 align=middle>
If you have any more ideas that would be great, but what I have now is big step forward. Thanks again, andrew
Replied 06 Feb 2004 17:01:57
06 Feb 2004 17:01:57 Marja Ribbers-de Vroed replied:
Okay, I think I understand what you mean.

Maybe you can minimize this effect somewhat by applying the Hide Layer Genie behavior to the onMouseOut event of the buttons.
In that case maybe the 'show' behavior gets intercepted and blocked by the 'hide' behavior.

Let me know how it goes.

--
Marja Ribbers-de Vroed
www.flevooware.nl
www.flevooware.nl/dreamweaver/
Replied 06 Feb 2004 17:54:13
06 Feb 2004 17:54:13 Marja Ribbers-de Vroed replied:
Try the following:

<pre id=code><font face=courier size=2 id=code>&lt;a href="javascript:;" onMouseOver="LGdelay=setTimeout('dmxFLG1(\'divMenu1\',1,1,\'\',2,\'imgMenu1\',1,146,0,1,10,0,-150,0,1,2,1,0,0)', 500)" onMouseOut="clearTimeout(LGdelay)"&gt;</font id=code></pre id=code>

--
Marja Ribbers-de Vroed
www.flevooware.nl
www.flevooware.nl/dreamweaver/
Replied 07 Feb 2004 00:09:27
07 Feb 2004 00:09:27 Andrew Halliday replied:
Marja, you're a star. That effect is absolutely superb, just what I'm looking for.
Thank you ever so much,
Kind Regards
Andrew
Replied 07 Feb 2004 12:11:34
07 Feb 2004 12:11:34 Marja Ribbers-de Vroed replied:
You're very welcome <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>

--
Marja Ribbers-de Vroed
www.flevooware.nl
www.flevooware.nl/dreamweaver/

Reply to this topic