Forum Moderators: open

Message Too Old, No Replies

Dreamweaver Show/Hide Layers

Hide layer function doesn't work when viewed with MACs

         

shelleuk

6:42 pm on Dec 9, 2003 (gmt 0)

10+ Year Member



This function works fine on PC's but MACs aren't having any of it. Pls see my URL... <snip> and go to the cv section...the flash movie shows through the other layers at all times: it should be hidden when you roll over the lefthand nav buttons....

How can I fix this?

Shelle uk

[edited by: engine at 3:46 pm (utc) on Dec. 10, 2003]
[edit reason] No urls, thanks. See TOS [webmasterworld.com] [/edit]

stever

10:57 am on Dec 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi Shelle, welcome to Webmasterworld. (You might want to take the URL out of your post as it's against the TOS here.)

Show/Hide Layers often causes problems as people don't apply the behaviours to the correct triggers - remember what's shown must always be able to be hidden again and vice versa...

In your case it sounds as though your Flash layer is not being hidden under certain circumstances.

shelleuk

12:41 pm on Dec 10, 2003 (gmt 0)

10+ Year Member



OK Steve - sorry about the URL inclusion there...didn't realise...how do I get rid of it? bit of a novice on forums...

Am sure my triggers are all OK - I am wondering if it's just simply the case that flash movies sit on top of everything else no matter what behaviours you apply to the layers....? Am using Dreamweaver by the way...

Michelle

stever

2:13 pm on Dec 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The post edit button should be on the left under your nick - but I'm not sure if it will work after a certain point.

You're correct that Flash normally sits on top of content - but not if it is in a layer (div) which has had its visibility changed. Try, for example, changing the Flash layer to invisible in the Layers panel (the closed eye) and seeing if you can still spot it in Mac (I'm betting you won't).

Most show/hide behaviour systems work with showing and hiding layers for _each_ change and having a "closer" layer - I suspect that all your triggers don't have the proper changes or that the Mac browser is positioning a closer layer improperly.

(There is a free AutoHide Dreamweaver extension which makes systems like this a bit easier.)

shelleuk

2:39 pm on Dec 10, 2003 (gmt 0)

10+ Year Member



no really! I do have my layer turned off i.e. invisible...hidden....closed eye n everything! I want it to show on a mouseover - which it does - but then it doesn't follow the intructions to hide again on another mouseover. All the layers are on top of each other ... is it a z-index issue I wonder?

What's a closer layer?

Will check out the D/W extension

Thanks Steve

Michelle

stever

2:51 pm on Dec 10, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A closer layer is normally a layer which sits under and around the triggers (like a navigation system, for example) in the z-index. It is filled with something like a transparent spacer.gif and its function is to act as a trigger to return things to normal when the mouse moves off the area of the other triggers.

Thus, if I understand your page correctly, your main triggers should hide the Flash layer and show the correct layer for the trigger. When the mouse moves off that trigger the closer layer surrounding it should prompt a return to normal (i.e. should make the Flash visible again).

You could also do this by leaving the Flash layer visible at all times and then covering it with the triggered layers on demand, but then you need to take care of the z-index, sizing and background of the layers on top.

Ducati

11:40 pm on Dec 10, 2003 (gmt 0)

10+ Year Member



Make sure to use the onMouseOver and the onMouseOut event to restore the original layer. So, here's how it should look...

<body onload=("MM_preloadImages'images/image1.gif','images/image2.gif');MM_showHideLayers 'Layer1','','show','Layer2','','hide')">

That will load the images and set the layer properties for the initial page load.

Then make sure you use something like this in the trigger.

<a href="javascript:;" onMouseOver="MM_showHideLayers('Layer1','','hide','Layer2','','show')"
onMouseOut="MM_showHideLayers('Layer1','','show','Layer2','','hide')">

Should work ok.