Hallo
Ich möchte eine Browser abfrage machen ob das Flash Plug-in installiert ist wenn ja Flash Animation abspielen wenn nein gif. Bild anzeigen. Habe auch ein script dazu gefunden doch ich hab leider zu wenig ahnung um es zum laufen zu bringen. Hier ist einmal das script wie ich es in der HTML Datei eingefügt habe:
<script type="text/javascript">
flash = false;
if ((navigator.plugins) && (navigator.plugins.length > 0))
{
for (a = 0; a < navigator.plugins.length; a++)
if ((navigator.plugins[a].name.indexof('flash') != -1) &&
(parseint(navigator.plugins[a].name) >= 4))
{
flash = true;
break;
}
}
if ((navigator.mimeTypes) && (navigator.mimeTypes.length > 0))
for (a = 0; a < navigator.mimetypes.length; a++)
if (navigator.mimetypes[a].type.indexof("application/x-shockwave-flash")>= 0)
flash = true;
</script>
</head>
<body BGCOLOR="#003399" LINK="#99CCFF" ALINK="#666666" VLINK="#99CCFF" text="#FFFFFF">
<table width="600" border="0" cellspacing="0" cellpadding="0" align="center">
<script type="text/vbscript">
on error resume next
flash = not IsNull(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))
<script type="text/javascript">
if(flash) {
document.write('<object classid=\"clsid
27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"610\" height=\"450\"><param name=\"movie\" value=\"file://main.swf\"><param name=\"quality\" value=\"high\"><embed src=\"file://test_preloader.swf\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"610\" height=\"450\"></embed></object>');
}else{
document.write('<img src=\"file://images/welcome4.gif\" width=\"140\" height=\"23\">');
}
</script>
MFG
Whisler
Ich möchte eine Browser abfrage machen ob das Flash Plug-in installiert ist wenn ja Flash Animation abspielen wenn nein gif. Bild anzeigen. Habe auch ein script dazu gefunden doch ich hab leider zu wenig ahnung um es zum laufen zu bringen. Hier ist einmal das script wie ich es in der HTML Datei eingefügt habe:
<script type="text/javascript">
flash = false;
if ((navigator.plugins) && (navigator.plugins.length > 0))
{
for (a = 0; a < navigator.plugins.length; a++)
if ((navigator.plugins[a].name.indexof('flash') != -1) &&
(parseint(navigator.plugins[a].name) >= 4))
{
flash = true;
break;
}
}
if ((navigator.mimeTypes) && (navigator.mimeTypes.length > 0))
for (a = 0; a < navigator.mimetypes.length; a++)
if (navigator.mimetypes[a].type.indexof("application/x-shockwave-flash")>= 0)
flash = true;
</script>
</head>
<body BGCOLOR="#003399" LINK="#99CCFF" ALINK="#666666" VLINK="#99CCFF" text="#FFFFFF">
<table width="600" border="0" cellspacing="0" cellpadding="0" align="center">
<script type="text/vbscript">
on error resume next
flash = not IsNull(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))
<script type="text/javascript">
if(flash) {
document.write('<object classid=\"clsid
}else{
document.write('<img src=\"file://images/welcome4.gif\" width=\"140\" height=\"23\">');
}
</script>
MFG
Whisler
Code:
Code: