+ Post New Thread
Results 1 to 4 of 4
Web Development Thread, Detection of flash within browser regardless of .. in Coding and Web Development; Hi, I need to know how to detect if flash is installed regardless of the browswer the end user is ...
  1. #1

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,708
    Thank Post
    3,245
    Thanked 1,048 Times in 970 Posts
    Rep Power
    364

    Detection of flash within browser regardless of ..

    Hi,

    I need to know how to detect if flash is installed regardless of the browswer the end user is using so that the website can automatically determine whether to load the flash version of the website or a the non flash version, is this possible, if so how ?

    Thanks

  2. #2

    Join Date
    Jul 2005
    Location
    Corby
    Posts
    1,056
    Thank Post
    12
    Thanked 20 Times in 18 Posts
    Rep Power
    24

    Re: Detection of flash within browser regardless of ..

    Hey.

    Get to work! :-)

    Here's some code:

    <SCRIPT LANGUAGE=JavaScript1.1>
    <!--
    var MM_contentVersion = 6;
    var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
    if ( plugin ) {
    var words = navigator.plugins["Shockwave Flash"].description.split(" ");
    for (var i = 0; i < words.length; ++i)
    {
    if (isNaN(parseInt(words[i])))
    continue;
    var MM_PluginVersion = words[i];
    }
    var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
    }
    else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
    && (navigator.appVersion.indexOf("Win") != -1)) {
    document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
    document.write('on error resume next \n');
    document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFla sh." & MM_contentVersion)))\n');
    document.write('</SCR' + 'IPT\> \n');
    }
    if ( MM_FlashCanPlay ) {
    window.location.replace("http://www.kirupa.com/flash.htm");
    } else{
    window.location.replace("http://www.kirupa.com/noflash.htm");
    }
    //-->

    </SCRIPT>

    Chew on that for a time...

    Paul

  3. #3

    Join Date
    Jul 2005
    Location
    Corby
    Posts
    1,056
    Thank Post
    12
    Thanked 20 Times in 18 Posts
    Rep Power
    24

    Re: Detection of flash within browser regardless of ..

    Of course, I just remembered that Macromedia put out a Flash Detection Kit that you can download etc. You can find it here:

    http://www.macromedia.com/software/f...detection_kit/

    Happy surfing!

    Paul

  4. #4

    mac_shinobi's Avatar
    Join Date
    Aug 2005
    Posts
    9,708
    Thank Post
    3,245
    Thanked 1,048 Times in 970 Posts
    Rep Power
    364

    Re: Detection of flash within browser regardless of ..

    That script will be useful for when it comes time to re create the kingswood website

SHARE:
+ Post New Thread

Similar Threads

  1. Web Browser hangs in test
    By dnpict in forum ICT KS3 SATS Tests
    Replies: 6
    Last Post: 15th May 2007, 03:33 PM
  2. Browser Master Rogue
    By john in forum Windows
    Replies: 5
    Last Post: 1st April 2007, 12:06 AM
  3. Computer Browser Service
    By sidewinder in forum Windows
    Replies: 1
    Last Post: 15th February 2007, 02:49 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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