Results 1 to 3 of 3

Thread: CSS drop down menu over flash run by javascript problem

  1. #1
    Join Date
    Apr 2009
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Exclamation CSS drop down menu over flash run by javascript problem

    I would like to find out how to fix drop down menu over flash when the flash content brought by the java/script below into iframe?
    You may see the problem here : http://67.220.225.130/~ktaelot/#

    also there is more .js .css for this picture gallery, when you press on any gallery the flash loads on top of menu which leaves it not accessible for use?

    Here is the script:

    <script type="text/javascript">
    var fo = new SWFObject("ext/viewer.swf", "viewer", "100%", "100%", "8", "#929681");
    fo.addVariable("preloaderColor", "0xffffff");
    fo.addVariable("xmlDataPath", "gallery.xml");
    fo.addVariable("fontColor", "0xdee0d6");
    fo.addVariable("footer", "© 2009");
    fo.write("flashcontent");
    </script>
    </div>

    <div id="introlayer" style="visibility: hidden; position:absolute; top: 0; left: 0; width: 100%; height: 100%; z-index:2; background: #929681; overflow: hidden">
    <div style="margin-top: 60px; width: 550px; margin-left: auto; margin-right: auto;">
    <span class="title" style="color: #dee0d6;">Vauxhall</span><br/><br/>

    <p style="text-align:right;">
    <a href="javascript:show_album();">&gt;&gt;</a>
    </p>
    </div>
    </div>

    <script type="text/javascript" language="javascript">

    function show_album() {

    document.getElementById('mainlayer').style.visibility = 'visible';
    document.getElementById('introlayer').style.visibility = 'hidden';
    document.getElementById('introlayer').style.overflow = 'hidden';
    }

    function show_intro() {

    document.getElementById('mainlayer').style.visibility = 'hidden';
    document.getElementById('introlayer').style.visibility = 'visible';
    document.getElementById('introlayer').style.overflow = 'auto';
    }

    var skip_intro = window.location.href.indexOf("?skip_intro")!=-1;
    if (!skip_intro && 0) {

    show_intro();
    }
    </script>

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    You have at least two problems (the second of which appears to have been worked out, but that might be only for when you have no content in the iframe):

    1. Flash content is normally displayed separately than other content on a page, so is not able to be 'stacked', generally appearing over everything.
    2. Iframes generally appear over everything.


    If you really have this second issue worked out, then all you need to do is add wmode transparent to the Flash. With the script you are using for that, you can do so like:

    Code:
                <script type="text/javascript">
                    var fo = new SWFObject("ext/viewer.swf", "viewer", "100%", "100%", "8", "#929681");
                    fo.addParam("wmode", "transparent");
                    fo.addVariable("preloaderColor", "0xffffff");
                    fo.addVariable("xmlDataPath", "gallery.xml");
                    fo.addVariable("fontColor", "0xdee0d6");
                    fo.addVariable("footer", "© 2009");
                    fo.write("flashcontent");
                 </script>
    Though, as I say, the content in the iframe may be a problem, different browsers treat this differently, and you may have already overcome this via javascript. If not, there must be no background color for anything appearing on the page in the iframe (set it to transparent for all elements including body and html). The iframe itself must have (for IE only) its allowtransparency attribute set to true. Even with all of that, the position and z-index style values must be set properly for the desired stacking. But, as I say, this may already be worked out in some other way, so give the first idea (about the Flash script) a try and see what happens, you will need to do at least that much regardless.
    Last edited by jscheuer1; 04-20-2009 at 03:21 PM. Reason: add info on iframe
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    ed7171 (04-20-2009)

  4. #3
    Join Date
    Apr 2009
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Thumbs up

    Thank You John

    Now the menu is working.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •