Hi,
Have had a good look at the Kirupa tute for detecting the flash player, the second part that loads an image instead of a flash movie if the player doesn’t exist is exactly what I need.
However I want to make the image ‘clickable’ but I am uncertain as to where to place the a href tags and alt text ( for rollover), to refresh memories the else arguement in the tute looks like this
Dont use Alt tags for that, tags should be a short word to replace the image. Incase the image dosent show up, or someone is browsing using without images, or even the screen readers or whatnot.
Yes I know, and my alt only say “click here” - pretty short. What I cannot figure out is how to make the image clickable within the code from that tute - any ideas ???
Hi i’ve tried using the same Kirupa script (as below but I’ve replaced all the file names accordingly) to detect and replace the SWF file with a GIF file but when i check the page on a system that doesn’t have Flash, the replacement GIF file is stuck right at the top of the page and the place where the swf file should be is now empty with a ‘missing image’ icon.
i am really bad with JS so i think i must have done something really wrong?
Appreciate your help! Desperately need a solution!
<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*)))
continue;
var MM_PluginVersion = words*;
}
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>
’); //FS hide this from IE4.5 Mac by splitting the tag
document.write(‘on error resume next
’);
document.write(‘MM_FlashCanPlay = ( IsObject(CreateObject(“ShockwaveFlash.ShockwaveFlash.” & MM_contentVersion)))
’);
document.write(’</SCR’ + ‘IPT>
’);
}
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=“script” WIDTH=“300” HEIGHT=“200” ALIGN=”">’);
Hi,
I can’t see anything wrong with your code, it is identical to mine, however I would think about changing the name of your .swf and .gif, if you sift through the code you will find
** ID="script"
script.swf
script.gif**
This may ( or may not be) the problem but is worth trying.
I should say that I have never tested this code in a browser that doesn’t have FlashPlayer installed, normally, I set the code to look for something that cannot be there as in
var MM_contentVersion = 8;
when it cannot find version 8 ( as it doesn’t exist) my gif is loaded in the right place.
Anyway try the above and let me know