SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict
    Join Date
    Jan 2001
    Posts
    244
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to get Floating Flash on top of other flash elements and not behind them?

    Take a look at this example link I'm doing. Wait till the page load to se the floating flash (Spiderman Flash Test).
    http://www.pulsorock.com/index-dhtml.php

    If you see the floating flash gets behind the other flash elements on the page. Will there be a way to preventing this? I want that the floating flash get on the top of all the content of the page, but haven't been successful on that. Here is the code I'm using for displaying the floating flash on the page (it can also be seeing on the source code at the bottom). If anyone know of a better code to do this and prevent the floating flash to get behind other flash elements, please let me know... I would be very appreciated.

    Code:
    <script language="JavaScript">
    <!--
    document.write('');
    function onepixal() {
    document.all.object1.style.pixelTop=(-1000);
    }
    function moveback() {
    document.all.object1.style.pixelTop=(-1);
    }
    var ShockMode = 0;
    // checking for flash 5
    var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
    if (plugin && parseInt(plugin.description.substring(plugin.description.indexOf(".")-1)) >= 1)
    {
    ShockMode = 0;
    }
    else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
    && (navigator.userAgent.indexOf("Windows 95")>=0 || navigator.userAgent.indexOf("Windows 98")>=0 || navigator.userAgent.indexOf("Windows NT")>=0)) {
    document.write('<S' + 'CRIPT LANGUAGE=VBScript\> \n');
    document.write('on error resume next \n');
    document.write('ShockMode = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))\n');
    document.write('<\/S' +'CRIPT\> \n');
    }
    if ( ShockMode ) {
    document.write('<DIV id="object1" style="position:absolute; width:750; height:600; visibility:show; left:0px; top:85px; z-index:2">');
    document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
    document.write(' codebase="http://active.macromedia.com/flash/cabs/swflash.cab"');
    document.write(' ID=banner WIDTH=740 HEIGHT=450>');
    document.write(' <PARAM NAME=movie VALUE="http://www.pulsorock.com/banners/demos/demo_spiderman.swf">');
    document.write(' <PARAM NAME=wmode VALUE=transparent> ');
    document.write(' <PARAM NAME=quality VALUE=autohigh> ');
    document.write('</OBJECT></DIV>');
    } else if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0)){
    }
    document.write('');
    //-->
    </script>
    Guillermo

  2. #2
    SitePoint Addict
    Join Date
    Jan 2001
    Posts
    244
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think I found a way.. all the flash elements on the page must have the param:
    <param name="wmode" value="transparent">
    in order that the float flash appear over them and not under them.
    Any other idea?
    Guillermo

  3. #3
    SitePoint Enthusiast hutchysk8er's Avatar
    Join Date
    Apr 2003
    Location
    Scotland
    Posts
    61
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i think it would help if we could accually see what was goin wrong, could u do something like make a copt of the page with the floating elements in it? i thought it just might be me who couldnt see it but checked the page source +the script after the </html> tag

  4. #4
    SitePoint Addict
    Join Date
    Jan 2001
    Posts
    244
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://www.pulsorock.com/index-dhtml.php
    Check the link again.. the script was at the end of the page after the </html>, because I was doing some tests... right now is inside the <body> </body>. I noticed doing other test on my side using layers and noticed that the layers appeared on the back of the flash elements, so the problem is using layers and flash elements that keep appearing in front of the layers. Would be there a parameter that could be set on the layer properties or in the flash html properties that could set the elements in front of or in back of other elements of the page?
    Guillermo

  5. #5
    SitePoint Addict
    Join Date
    Jan 2001
    Posts
    244
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This may be the problem I'm having...
    http://www.macromedia.com/support/fl..._top_layer.htm
    Will be any other fix than the one mentioned there?
    Guillermo

  6. #6
    SitePoint Addict
    Join Date
    Jan 2001
    Posts
    244
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well I did what the Macromedia website suggested. I used the wmode transparent value. I'll have to change all the flash elements to avoid that to happen... but at least it fix the problem.
    Guillermo


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
  •