detect flash
Moderator: General Moderators
detect flash
anyone know of a good script (javascript) that detect if the user does not have flash or a good version of flash and displays an image in place of yoru flash if they dont?
when you export flash
When you export the movie you can set flash to publish a detection script but it's always the same script with a few variables changed out. The things that should be changed have {b] [/b] tags.
Code: Select all
<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.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="їb]name of fileї/b]" WIDTH="207" HEIGHT="70" ALIGN="left">');
document.write(' <PARAM NAME=movie VALUE="їb]FULL/PATH/TO/MOVIEї/b]"> <PARAM NAME=quality VALUE=high> <PARAM NAME=salign VALUE=L> <PARAM NAME=bgcolor VALUE=#FFFFFF> ');
document.write(' <EMBED src="їb]FULL/PATH/TO/MOVIEї/b]" quality=high salign=L bgcolor=#FFFFFF ');
document.write(' swLiveConnect=FALSE WIDTH="їb]widthofmovieї/b]" HEIGHT="їb]heigthofmovieї/b]" NAME="їb]name of fileї/b]" ALIGN="left"');
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="їb]Path to replacement imageї/b]" WIDTH="207" HEIGHT="70" BORDER=0>');
}
//-->
</SCRIPT>I forgot about that post.. here is what i used
i actually found that script, thanks a bunch!