An important part of developing a Flash application is to make sure the users can view it.
The Flash Player is in constant development by the owners Adobe, therefore I advise Flash developers to always verify that the users have the correct version installed on their machine.
There are various ways to do this, but the sure bet is to use the detection kit distributed by Adobe.
I've personally downloaded it ( here ) and I've personalized it a little.
Let's see why'
Usually I apply the following logic to all applications I develop:
I create an HTML file without SWF in it just to obtain the user's Flash Player version and if valid, I redirect them to the HTML page including the SWF, otherwise I tell the user to update their Flash Player.
The script that I currently use is the following:
HTML Code:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>main</title>
<script language="javascript"> DetectFlashVer = 0; </script>
<script src="http://www.flepstudio.org/forum/tutorials/AC_RunActiveContent.js" language="javascript"></script>
<script language="JavaScript" type="text/javascript">
var requiredMajorVersion = 9;
var requiredMinorVersion = 0;
var requiredRevision = 45;
</script>
</head>
<script language="JavaScript" type="text/javascript">
var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
if(hasRightVersion)
{
window.location.href = "http://www.miosito.com/paginaflash.html";
}
else
{
var alternateContent = "Per una corretta visualizzazione, questo sito richiede l' installazione sul tuo PC di Adobe Flash Player "
+ '<a href=http://www.adobe.com/shockwave/download/download.cgi'P1_Prod_Version=ShockwaveFlash&Lang=Italian>Installa adesso</a>';
document.write(alternateContent);
}
</script>
<noscript><p>Per una corretta visualizzazione, questo sito richiede l' installazione sul tuo PC di Adobe Flash Player<p><p><p></p>
<p> clicca<span class="style1"></span> <a href="http://www.adobe.com/shockwave/download/download.cgi'P1_Prod_Version=ShockwaveFlash&Lang=Italian">Installa adesso</a><p><p><p></p>
</noscript>
I usually save it as index.html and I keep it in the folder holding the Flash application on the server.
This way the user is directed to index.html, which will either re-direct them to the application or show them a warning of the kind:
This site is best viewed after installation of Adobe Flash Player'etc etc
Obviously you can personalize it by using simple html.
For those of you who would like to try/use this script, I remind you to change the following line where the re-direction happens if the version is correct:
window.location.href = "http://www.mysite.com/flashpage.html";
Stay tuned !