HighDots Forums  

show/hide delay?

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss show/hide delay? in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
DreamWvrWannabe
 
Posts: n/a

Default show/hide delay? - 07-09-2004 , 03:34 PM






is there any way to add like a 1 second delay before it does the hide or show
action for a layer? Because it seems to flicker for just a split second when
the cursor moves from the trigger image to layer.


Reply With Quote
  #2  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: show/hide delay? - 07-09-2004 , 03:55 PM






That's usually because of a coding/layout problem. Can you post a URI to
the page?

--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"DreamWvrWannabe" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
is there any way to add like a 1 second delay before it does the hide or
show
action for a layer? Because it seems to flicker for just a split second
when
the cursor moves from the trigger image to layer.




Reply With Quote
  #3  
Old   
DreamWvrWannabe
 
Posts: n/a

Default Re: show/hide delay? - 07-09-2004 , 04:41 PM



Hey murray, heres the link, the menu button is the trigger image. Its kind of
hard to tell when its online, i'm not sure if i'm just nitpicking or not but if
you roll the cursor very slowly between the menu button and the menu that pops
up you can tell. I made sure the menu button has like an inch and a half of
white under it to make sure that the cursor would never leave the trigger image
before it hits the layer. Thanks for all your help, I really appreciate it.

http://www.allpriser.com/Download/dave/site/Demo.htm


Reply With Quote
  #4  
Old   
Murray *TMM*
 
Posts: n/a

Default Re: show/hide delay? - 07-09-2004 , 05:23 PM



The problem is here -

<td colspan="2"><img src="images/Menu/TopMenu/TopBar.jpg" name="undefined_2"
width="1003" height="70"> <img src="images/1WhiteSquare.gif"
name="undefined_2" width="14" height="14" align="left"><a
href="javascript:;" onMouseOver="MM_showHideLayers('LayerMenu','','sho w')"
onMouseOut="MM_showHideLayers('LayerMenu','','hide ')"><img
src="images/Menu/TopMenu/Menubutton.gif" name="menu" width="72" height="40"
border="0" id="menu"></a></td>

You are using a mouseout event on the trigger to hide the submenu layer.
This would be a problem normally (since you must mouseout of the trigger to
select a submenu option), but you are trapping that mode here -

<td><a href="javascript:;" onClick="MM_goToURL('parent','index.htm');return
document.MM_returnValue"
onMouseOver="MM_swapImage('home','','images/Menu/TopMenu/homeover.gif',1);MM
_showHideLayers('LayerMenu','','show')"

by making a mouseover on the submenu option keep the submenu alive. Since
there is a gap between the trigger and the submenu, you will always get this
flickering as the browser tries to decide whether to show or hide the
submenu.

A much better method is to have a third layer underneath the other two.
Make this layer large enough to hold a transparent GIF image that can extend
about 10 pixels beyond the top, bottom and sides of the area encompassed by
the trigger and the submenu.

Now - select the GIF image in this layer (let's call it the closer layer)
and apply a show-hide behavior to it to hide the submenu AND the closer
layer onmouseover. Then hide the closer layer.

Finally, select the trigger, and edit the show-hide behavior to show the
submenu AND the closer layer onMouseOver. To make sure it all works right,
however, move the submenu up so that there is no gap between the submenu and
the trigger (you could also interpose a 'blocker layer' in this region to
prevent the closer from triggering if you want to keep a gap there).

So - mouseover on the trigger shows the submenu and the blocker (if any) and
the closer. Mouseout the trigger does nothing.

Mouseover the closer transparent GIF hides the submenu, blocker (if any) and
closer.

Bada bing, bada boom. All flickering is gone.


--
Murray --- ICQ 71997575
Team Macromedia Volunteer for Dreamweaver MX
(If you *MUST* email me, don't LAUGH when you do so!)
==================
news://forums.macromedia.com/macromedia.dreamweaver - THE BEST WAY TO GET
ANSWERS
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================

"DreamWvrWannabe" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Hey murray, heres the link, the menu button is the trigger image. Its
kind of
hard to tell when its online, i'm not sure if i'm just nitpicking or not
but if
you roll the cursor very slowly between the menu button and the menu that
pops
up you can tell. I made sure the menu button has like an inch and a half
of
white under it to make sure that the cursor would never leave the trigger
image
before it hits the layer. Thanks for all your help, I really appreciate
it.

http://www.allpriser.com/Download/dave/site/Demo.htm




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.