SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Thread: Flash detection

  1. #1
    SitePoint Member
    Join Date
    Apr 2002
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Flash detection

    Dear Flash Ninja's,

    I'd like to feature Flash banner ads in a project I am working on. Ideally I would setup a detection script for visitors that would look for the relevant version of the Flash plugin and if Flash was not present it would display an equivelent animated .gif or jpeg.

    This would be without prompting to download the Flash player at any point.

    Any ideas or examples on how to achieve that?

    Regards,

    Simon

    Flash Newbie...
    -----
    Web Designer & Internet Consultant
    www.simonlilly.co.uk
    sililly@hotmail.com
    -----

  2. #2
    Non-Member Forlorn's Avatar
    Join Date
    Mar 2002
    Location
    San Diego, California
    Posts
    1,132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its all about Dreamweaver. Dreamweaver has an action that lets you do that entirely

  3. #3
    SitePoint Member
    Join Date
    Apr 2002
    Posts
    24
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Action?

    When you say an Action, do you mean a behaviour or an extension or something completely different?

    Cheers,

    Simon
    -----
    Web Designer & Internet Consultant
    www.simonlilly.co.uk
    sililly@hotmail.com
    -----

  4. #4
    . Ruchir's Avatar
    Join Date
    Feb 2002
    Location
    Sydney
    Posts
    1,863
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    cant u just use the convert the .fla into .gif utility of Flash. that can still keep the image animating !!
    Peace.

  5. #5
    ...
    Join Date
    Jan 2002
    Location
    London, UK
    Posts
    759
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if you’re using Flash MX - there's an option to do this (using Javascript to check for a specific version of the Flash plugin and if that version doesn't exist displays astatic image it also adds a <noscript> tag for SE's and non JS browsers

    Its in Ctrl+Shift+F12 > HTML tab > Template > Detect for Flash X - you'll need to go in a modify the paths to the files once it's exported.

    Give me a shout if you're not using MX and ill post the code

  6. #6
    SitePoint Enthusiast
    Join Date
    Jul 2002
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    the code

    Hi,

    I'm not using mx and i'd love the code!

    cheers,
    jen

  7. #7
    ...
    Join Date
    Jan 2002
    Location
    London, UK
    Posts
    759
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    <SCRIPT LANGUAGE=JavaScript1.1>
    <!--
    // All bold areas are editable
    
    var MM_contentVersion = 5;
    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.ShockwaveFlash." & MM_contentVersion)))\n');
    	document.write('</SCR' + 'IPT\> \n');
    }
    if ( MM_FlashCanPlay ) {
    		document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
    	document.write('  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ');
    	document.write(' ID="SwishBannerFinal2" WIDTH="468" HEIGHT="60">');
    	document.write(' <PARAM NAME=movie VALUE="SwishBannerFinal2.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FF7800>  '); 
    	document.write(' <EMBED src="SwishBannerFinal2.swf" quality=high bgcolor=#FF7800  ');
    	document.write(' swLiveConnect=FALSE WIDTH="468" HEIGHT="60" NAME="SwishBannerFinal2"');
    	document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');
    	document.write(' </EMBED>');
    	document.write(' </OBJECT>');
    } else{
    	document.write('<IMG SRC="SwishBannerFinal2.gif" WIDTH="468" HEIGHT="60" usemap="#SwishBannerFinal2" BORDER=0>');
    }
    //-->
    </SCRIPT><NOSCRIPT><IMG SRC="SwishBannerFinal2.gif" WIDTH="468" HEIGHT="60" usemap="#SwishBannerFinal2" BORDER=0></NOSCRIPT>

  8. #8
    SitePoint Zealot
    Join Date
    May 2002
    Posts
    105
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Talking

    hi charlie

    nice to see you here.
    and thanks for the code
    Learn the best flash tutorials on the net from advanced to basic worth a visit also flash games to play http://www.flashcircle.com
    The Best articles On The Net Amazing Stories - Free Greetings

  9. #9
    ...
    Join Date
    Jan 2002
    Location
    London, UK
    Posts
    759
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Donny


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
  •