Safari WIndows and Transparent Flash

后端 未结 2 1580
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-19 10:55

// Edit: The issue now appears to be confined to Safari for Windows.

Around the time Safari for Windows 4 came out I started hearing from users that wmode=transpare

相关标签:
2条回答
  • 2021-01-19 11:37

    I have the same problem with Safari for Windows. But after I've updated my Flash Player to version 10.0.45.2, the problem is gone. So I think it's a Flash player bug.

    0 讨论(0)
  • 2021-01-19 11:55

    UPDATE: The problem is with the flash player for windows safari but has been solved after Flash Player version 10.0.45.2

    Yes, It is only with Safari on Windows! And it's interesting that there is not much written about this on the internet I've been experiencing the same issue, I guessed at first that it has a default value of #FFFFFF for bgcolor and I tried setting it to transparent (not wmode but bgcolor!). it still works in every other browser but it had a green color in Safari (so don't try that! and no the bug is not with the word transparent not being defined! I tried!). Seems that we have to wait for apple to fix it in the next versions but if you want to change the background color if you only have a solid color underneath you can use:

    if you're using the adobe script or javascript to display the flash (recommended)

    <!--html-->
    <script src="[adobe flash detector script]">
    AC_FL_RunContent( 'wmode', 'transparent','bgcolor', 'xxxxxx');
    </script>
    
    >

    else if youre using embed and or for the <noscript>:

    
     <param name="wmode" bgcolor="#xxxxxx" value="transparent">
    

    ...aslo

    
     <embed wmode="transparent" bgcolor="#xxxxxx">
    
    if you wanna detect safari on windows and not display it - or maybe give the the least zindex:
    
    //Javascript: 
    var isSafari = (navigator.userAgent.indexOf("Safari") != -1) ? true : false;
    var isWindows = (navigator.userAgent.indexOf("Windows") != -1) ? true : false;
    if (isSafari && isWindows) document.getElementById('yourflashid').style.display = 'none';
    if (isSafari && isWindows) document.getElementById('yourflashid').style.Zindex = '-1000';
    
    > if you have php it's better to do it with php as changing DOM elements with js makes page load slower and requires javascript

    <?php
    //PHP
    /* i like to make a .php external css style sheet
     (you have to have a transitional HTML document! 
    or most browsers will not read it beacuse of difference in MIME types!)*/
    function agent($browser) {
    $useragent = $_SERVER['HTTP_USER_AGENT'];
    return strstr($useragent,$browser);
    }
           if(agent("Safari") != FALSE) {
                  if(agent("Windows") != FALSE)  { // on windows
    ?>
    
    #myflash {display:none;}
    #verisignflash {z-index:-100; /* for example I already made #000 bgcolor for this and looks right*/
    <?php } //All Safari's }

    ... and then the code for Safari in general as the rest seem to be compatible! however you can add and else statement here and seperat them

    If someone finds a better option I will be glad to read it here!

    0 讨论(0)
提交回复
热议问题