Skal bare være opmærksom på at nedenstående kun virker i 4+ browsere
mvh Ryan
On Fri, 15 Dec 2000 10:55:35 +0100, Ghashûl <ghashul@ghashul.dk>
wrote:
>On Mon, 11 Dec 2000 11:05:32 +0100, "crane" <info@airsoftgun.dk>
>wrote:
>
>>hvordan tjekker man om clienten kan spille flash & version ?
>>
>>crane
>>
>
>Det kan ikke gøres i ASP men med JavaScript. Her er et eksempel fra
>DreamWeaver:
>
>
><html>
><head>
><title>Untitled Document</title>
><meta http-equiv="Content-Type" content="text/html;
>charset=iso-8859-1">
><script language="JavaScript">
><!--
>function MM_checkPlugin(plgIn, theURL, altURL, autoGo) { //v4.0
> var ok=false; document.MM_returnValue = false;
> with (navigator) if (appName.indexOf('Microsoft')==-1 || (plugins &&
>plugins.length)) {
> ok=(plugins && plugins[plgIn]);
> } else if (appVersion.indexOf('3.1')==-1) { //not Netscape or Win3.1
> if (plgIn.indexOf("Flash")!=-1 && window.MM_flash!=null)
>ok=window.MM_flash;
> else if (plgIn.indexOf("Director")!=-1 && window.MM_dir!=null)
>ok=window.MM_dir;
> else ok=autoGo; }
> if (!ok) theURL=altURL; if (theURL) window.location=theURL;
>}
>//-->
></script>
></head>
>
><body bgcolor="#FFFFFF" text="#000000"
>onLoad="MM_checkPlugin('Shockwave
>Flash','
http://flash','http://ikkeflash:(',false);return
>document.MM_returnValue">
></body>
><script name="Used by MM_checkPlugin" language="javascript">
><!--
>with (navigator) if (appName.indexOf('Microsoft')!=-1 &&
>appVersion.indexOf('Mac')==-1) document.write(''+
>'<scr'+'ipt language="VBScript">\nOn error resume next\n'+
>'MM_dir = IsObject(CreateObject("SWCtl.SWCtl.1"))\n'+
>'MM_flash = NOT
>IsNull(CreateObject("ShockwaveFlash.ShockwaveFlash"))\n</scr'+'ipt>');
>//-->
></script>
></html>
>
>--
>Regards Sir Ghashûl, Knight of The alt.Roundtable <><
>ICQ: 7223629 Email: stefan@bruhn.to