Javascript - browser sniffing - wmode/flash/dhtml menus

Discussion in 'JavaScript' started by username, Oct 30, 2005.

  1. #1
    Hi, I wonder if anyone can help me put together a browser sniffer:

    What I need to do is:
    1. sniff for browsers that do not support WMODE (see below)
    2. sniff for browsers that do not have flash installed
    3. sniff for browsers that have a version of flash less than the minimum required to support WMODE (windows Flash 6,0,65,0) & (mac Flash 6,0,67,0).

    For these browsers I need to serve a static image instead of a flash movie.
    - The reason being is that a dhtml menu will sit on top of the flash movie - which is made possible with WMODE.

    The browsers I defintely need to provide this support for are:

    IE5+ (PC and Mac),
    firefox, safari, opera

    The following browsers support "Windowless Mode" (wmode):

    Windows and Mac OS X

    Internet Explorer 3 or higher (Windows)
    Internet Explorer 5.1* and 5.2* (Macintosh)
    Netscape 7.0*
    Mozilla 1.0 or higher*
    AOL*
    CompuServe*

    * Macromedia Flash Player version 6,0,65,0 (Windows) o 6,0,67,0 (Macintosh) or more recent versions support WMODE.

    This is the code I have so far:

    
    <script language="JavaScript">
    <!--
     
    var flashMovie = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
     
    codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=2,0,0,0" width="559" height="190">
            <param name="movie" value="homepage.swf">
            <param name="wmode" value="transparent">
     
            <embed src="homepage.swf" width="559" height="190" pluginspage="http://www.macromedia.com/shockwave/download/"
     
    wmode="transparent">        
    </embed>
          </object>';
     
     
      if (is_gecko)
      {
        document.write(flashMovie);
      }
      else if (is_nav7up)
      {
       document.write(flashMovie);
      }
      else if (is_ie3up)
      {
       document.write(flashMovie);
      }
      else if (is_opera8up)
      {
       document.write(flashMovie);
      }
      }
      else
      {
        document.write('<img src="image.jpg" alt="">');
      }
    // -->
    </SCRIPT>    
    
    
    
    HTML:

    Thanks for any help.
     
    username, Oct 30, 2005 IP
  2. username

    username Peon

    Messages:
    6
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    it appears that i am asking a hard question here
    in several forums the same response - nothing!
     
    username, Nov 4, 2005 IP