java script menu hiding behind the flash screensaver-php

Hi,

We are developing a web site using java script  and php , we are embedding flash in the home page.The drop-down menu is showing fine for on mouse hover of menu item  for default flash ( 0th position of flash pattern) but after it is  switched  to next flash the drop-down menu is hiding behind the flash , but i can see the menu when the flash is changing. So i am suspecting that menu is still there but the flash is stealing the focus , so i would like to get suggestion to keep the drop-down menu on top always.Is there any way to describe the flash not to come on to  the top position.

Thank you.
Finsol123Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Shaun McNicholasSenior Marketing TechnologistCommented:
Can you put a link up here to the page so I can take a look at the page.
0
section25Commented:
I had the same situation you have and resolved it this way:

I have a web page that has some HTML links, buttons and other stuff on it and I also have a flash menu that sits at the top of the page. Even though the flash menu was closed, the DIV it resided in, was on top of the other HTML DIV so the HTML stuff was inaccessible. So I set up my page like this:

I have a DIV called "top" which holds my Flash file. My flash file extends full screen from left to right and is 304 pixels high. This is the set up for that DIV:

<div id="top" style="position:absolute; left:0px; top:0px; width:100%; height:304px; z-index:95">


Now I have another DIV called "middle_content" for my HTML content that I set up like this:

<div id="middle_content" style="position:absolute; left:0px; top:105px; width:100%; margin:0px auto; border:none; z-index:99" >


Then I simply include my HTML in that div as you would normally do.

I know not everyone uses FlashObject for displaying their Flash content, but if you don't you can still use this method. Also if you don't use FlashObject, I highly recommend it. At any rate, I use Flash object to put my flash object into the "top" DIV like this:

var fo = new FlashObject("/page_top.swf", "top", "100%", "304", "9", "#ffffff");
      fo.addParam("quality", "high");
      fo.addParam("movie", "page_top.swf");
      fo.addParam("loop", "false");
      fo.addParam("wmode", "transparent");
      fo.addParam("scale", "noscale");
      fo.addParam("salign", "left");
      fo.write("top");

Now inside my Flash script, I simply have something that listens for my menu buttons. Whenever the menu buttons are rolled over (which makes them drop down) I run this little piece of code:

ExternalInterface.call("move_forward");

and when they roll off the button, I call

ExternalInterface.call("move_backwards");

What that does is call a javascript function on my HTML page which tells the 2 DIVS that overlap to switch places and put the one I want at the time on top. So when the Flash menu is exposed, I call "move_forward". This places the Flash DIV ("top") on top of the HTML DIV ("middle_content"). The move_backwards script does just the opposite and places the Flash DIV behind the HTML one. It works flawlessly for me. It should work for you also. This is the javascript for moving the DIVS:

 function move_forward() {
     document.getElementById('top').style.zIndex = 99;
     document.getElementById('middle_content').style.zIndex = 97;
 }
 
function move_backwards() {
      document.getElementById('top').style.zIndex = 98;
      document.getElementById('middle_content').style.zIndex = 99;
}


Of course this works for IE and may have to be tweaked to work with other browsers.

That's it. Once all these elements are in place everything should work the way you need it to.
0
Jen0910Commented:
Not sure if you need to go about it that way initially (external interface calls). I've run into your problem a lot with menus in javascript and CSS, I always solved it by first making sure the "wmode" for each flash SWF pram is set to "transparent" and giving flash container a much lower z-index than your menu container with CSS to make sure flash appears behind it. If that fails to do the trick, then try section25's more technical approach.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Finsol123Author Commented:
We have changed the flash and also javascript menu style. So that the issue is resolved.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Dreamweaver

From novice to tech pro — start learning today.