Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: FLASH: Re: Detection Alternate NOT working
From: Peter Reynolds
Date: Tue, 30 May 2000 20:23:41 +0100

I've tested this site on over 30 configurations -- including IE5 windows and
mac --- on all it worked flawlessly.

The script used is an adaptation of Colin Moocks @ http://www.moock.org/

<HTML>
<HEAD>
<TITLE>Index</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<meta http-equiv="refresh" content="4;URL=noflash.html">
<SCRIPT LANGUAGE="JavaScript">
<!--
// *************
// user defined globals
// modify the following variables to customize the inspection parameters
// *************
var requiredVersion = 4; // version the user needs to view site (max
is 5, min is 2)
var useRedirect = true; // "true" loads new flash or non-flash page
into browser
// "false" embeds movie or alternate html
code into current page
// set next three vars if useRedirect is true...
var flashPage = "index_success.html" // the location of the flash
movie page
var noFlashPage = "Undetectable.html" // send user here if they don't
have the plugin or we can't detect it
var upgradePage = "Noflash.html" // send user here if we detect an old
plugin

// system globals
var flash2Installed = false; // boolean. true if flash 2 is installed
var flash3Installed = false; // boolean. true if flash 3 is installed
var flash4Installed = false; // boolean. true if flash 4 is installed
var flash5Installed = false; // boolean. true if flash 5 is installed
var maxVersion = 5; // highest version we can actually
detect
var actualVersion = 0; // version the user really has
var hasRightVersion = false; // boolean. true if it's safe to embed
the flash movie in the page

// -->
</SCRIPT>

<SCRIPT LANGUAGE="JavaScript">
<!--
// write vbscript detection if we're on ie win

var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
// true if we're on ie
var isMac = (navigator.appVersion.indexOf("Mac") != -1) ? true : false; //
true if we're on mac

if(isIE && !isMac) // don't write vbscript tags on anything but ie win
{
document.write('<SCRIPT LANGUAGE=VBScript\> \n');
document.write('on error resume next \n');
document.write('flash2Installed =
(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n');
document.write('flash3Installed =
(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n');
document.write('flash4Installed =
(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
document.write('flash5Installed =
(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');
document.write('</SCR' + 'IPT\> \n'); // break up end tag so it doesn't
end our script
}
// -->
</SCRIPT>

<SCRIPT LANGUAGE="JavaScript">
<!--
// do our javascript detection if the navigator object is fully supported

if (navigator.plugins) // does
navigator.plugins exist?
{
if (navigator.plugins["Shockwave Flash 2.0"] // is Flash 2
installed?
|| navigator.plugins["Shockwave Flash"]) // no? then is flash 3+
installed?
{
var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" :
""; // flash 2 ref.
var flashDescription = navigator.plugins["Shockwave Flash" +
isVersion2].description; // plugin description
var flashVersion =
parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1)); //
plugin version

if (flashVersion == 2) flash2Installed = true; // set appropriate
version flag
if (flashVersion == 3) flash3Installed = true;
if (flashVersion == 4) flash4Installed = true;
if (flashVersion == 5) flash5Installed = true;
}
}

for (var i = 2; i <= maxVersion; i++) // loop through all versions we're
checking
{
if (eval("flash" + i + "Installed") == true) actualVersion = i; // set
actualVersion to highest detected version
}

// uncomment next line to display flash version during testing
// alert("version detected: " + actualVersion);

// finished getting the version, time to take the appropriate action

if (actualVersion >= requiredVersion) // user has a new
enough version of flash
{
hasRightVersion = true; // okay to write out
the object/embed tags
if (useRedirect) window.location = flashPage; // if desired, load the
flash page
}
else // user doesn't have a new enough version. load alternate page if
desired.
{
if (useRedirect) window.location = (actualVersion >= 2) ? upgradePage :
noFlashPage;
}

// -->
</SCRIPT>
</HEAD>
<BODY BGCOLOR="#FF6600">
<div align="center"><IMG NAME="Index" SRC="checking.gif" WIDTH=398
HEIGHT=42> </div>
</BODY>
</HTML>

> From: Jefferis Peterson <Jefferisatpathway [dot] net>
> Reply-To: flasheratchinwag [dot] com
> Date: Tue, 30 May 2000 14:54:26 -0400
> To: Flash MailList <flasheratchinwag [dot] com>
> Subject: FLASH: Re: Detection Alternate NOT working
>
> Hehe.. Peter. In IE 5 the page below became a blank page... no redirect,
> no nothing... :-)
>
> Jeff
>
> Jefferis Peterson, Pres.
> Flash and Web Design
> http://www.PetersonSales.net
> Tel & Fax. 724-458-7169
>
> ICQ 19112253
>
> flasher-digest
>
>> From: Peter Reynolds <preynoldsatmac [dot] com>
>> Subject: Re: FLASH: Detection Alternate NOT working
>>
>> Visit for http://www.petescv.co.uk/
>> For a detection script sequence that works.
>>
>> Peter
>
> flasher is generously supported by...
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> World Animation Celebration - Big Internet Animation Pow Wow Discount Offer
>
> Register before May 25 mention flasher and save 25%!! www.wacfest.com
>
> Be discovered, get a job or have your web series picked up. A big talent
> search for Shockwave
> and Flash animators is happening May 30-June 4 in Hollywood. Featuring Rob
> Burgess, Matt
> Groening, Brad Bird and more. www.wacfest.com
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> To unsubscribe or change your list settings go to
> http://www.chinwag.com/flasher or email helpatchinwag [dot] com
>


flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
World Animation Celebration - Big Internet Animation Pow Wow Discount Offer

Register before May 25 mention flasher and save 25%!! www.wacfest.com

Be discovered, get a job or have your web series picked up. A big talent search for Shockwave
and Flash animators is happening May 30-June 4 in Hollywood. Featuring Rob Burgess, Matt
Groening, Brad Bird and more. www.wacfest.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  FLASH: Re: Detection Alternate NOT worki, Jefferis Peterson

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]