This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Flash Site Design > March 2004 > Flash and DHTML/CSS z-index





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Flash and DHTML/CSS z-index
arcanerain

2004-03-30, 9:07 pm

I have a web page that uses a dynamic JavaScript/DHTML menu - there is a main
menu, with submenus appearing when moused-over a main menu item. This menu
uses layers (<div> tags) when displaying. I have added a Flash presentation
onto this web page, next to the menu. Now the main menu appears, however, the
submenus are hidden behind the Flash presentation.

I have tried to place the Flash presentation behind this menu by designating
this presentation on its own layer with a z-index that is less than the z-index
of the menu.

That didn't work.

I am not that familiar with Flash - is there a setting I need so that the
Flash presentation will always be behind this menu?

Thanks very much!

Ed Massey

2004-03-30, 9:07 pm

I think that flash always lies ontop of other content, I remember seeing the
same question a couple of years back.
Things may have changed since then but as far as I remember you cannot put
anything on top of the flash movie.


jmack007

2004-03-30, 9:07 pm

Well, it CAN be done, but that does not mean it should be or is easy to do.

I have done this by putting my OBJECT tags with DIV tags and manipulating them
using CSS/Javascript DOM DHTML.

However, this requires a lot of work to get right. You must make sure you
implement a Javascript Cross-Browser DOM that can move and align DIVs and
SPANs. Since it is very hard to code an entire page using positioning of DIVS
most still use tables. Also, since you cannot manipulate DIVS in NN4 that
browser is automatically out.

You can, however, get this all to work in IE4 using the 'ALL' DOM. You can
also have it working in NN6+ or IE5+ by using the W3C standard getElementById()
DOM. You will have to not only figure how to move the DIVs up or down z-indexes
but also write a script that detects which DOM is present and branches to the
appropriate code to position the elements dynamically.

--jmac

arcanerain

2004-03-30, 9:07 pm

Do you happen to know where I could get some examples for this??

I am more of a beginner in JavaScript...

Thanks!
arcanerain

2004-03-30, 9:07 pm

The solution is:

http://www.macromedia.com/support/f...h_top_layer.htm

Worked perfectly for me...

HTH!!!
Joel Farris

2004-03-30, 9:08 pm

jmack007 wrote:

> Well, it CAN be done, but that does not mean it should be or is easy to do.
>
> I have done this by putting my OBJECT tags with DIV tags and manipulating them
> using CSS/Javascript DOM DHTML.
>
> However, this requires a lot of work to get right.


[snip]


So what would you possibly need to put into a z-indexed div that you
couldn't put in the top layer of the .swf?

--
Joel Farris | Q: It reverses the logical flow of conversation.
twinkledust Designs | A: Why is top posting frowned upon?
http://twinkledust.com |
AIM chat: FarrisJoel |
| (this fifth line in my sig angers the net kops!)

jmack007

2004-03-30, 9:08 pm

2 reasons--

1. WMODE=transparent only works with <OBJECT> tags. Therefore, browsers using
<EMBED> to diaplay Flash content will fail to work like IE sites using the
<OBJECT> method of Flash content display.

2. With Flash Player 6 you could only use video content that was in Quicktime
format. Unfortunately, this is not always acceptable to clients as the format
of delivery of their intended video content or current video content. Using
javascript functions within a flash movie- or- Javascript functions in the HTML
portion of a site you can then have the HTML and Flash layout of your site look
the same but just "drop"/ "layer" the video component-- WAV, etc. inline and
above the Flash Player like you would layering above a CSS-DHTML layout.

--jmac

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews