Flash CS3 - Flash CS4

Free tutorials and scripts for all.
Actionscript 3.0

Obtaining the user's Flash Player version

This is a discussion on Obtaining the user's Flash Player version within the Tutorials forums, part of the English Forums category; An important part of developing a Flash application is to make sure the users can view it. The Flash Player ...


Go Back   Forum Flash CS3 Flash CS4 > English Forums > Tutorials

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 29-09-07, 10:30
Administrator
 
Join Date: Jul 2007
Location: Cesena
Posts: 4,446
Rep Power: 6
Flep is on a distinguished road
Obtaining the user's Flash Player version

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 !
__________________

 


I recommend: Essential Actionscript 3.0

- Non rispondo ai messaggi privati con domande tecniche. Apri una discussione sul forum !
- I do not reply technicians pvt messages. Open a thread !

Last edited by Flep; 28-08-08 at 06:57..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads

Thread Thread Starter Forum Replies Last Post
Events Scroller - version 2 Flep FlepStudio utilities 9 11-11-08 04:33
Come si svuota la cache del player flash??? marshall Flash CS3 Design 4 24-07-08 16:07
Flash Player Express Install Flep Articoli e tutorials 1 18-10-07 17:09
Flash Player Express Install Flep Tutorials 0 29-09-07 10:24
Flash Player 9 detection kit Affidabile Davide78 Flash CS3 generale 3 10-08-07 14:52


All times are GMT. The time now is 21:20.


Powered by vBulletin versione 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC4
Forum SiteMap


FlepStudio
by Filippo Lughi
P.IVA 03605860406