scandalz.net
 
 
 
BETA (Google AJAX Search)

Flash 10 Version detection fix

Oh man, there are going to be a lot of sites that are going to get hit with this bug.

Why are flash sites telling me my version of flash is too old?

There is an old flash version detection algorithm out there like this:

	ver version = getVersion();
	if (version.substr(4, 1) < "8"){
		// tell user to upgrade flash
	}
	

This code isn't working for Flash 10. The version strings from flash look like this:

Version Strings
Flash 9 : WIN 9,0,115,0
Flash 10: WIN 10,0,12,36

and when you chop off the first four characters "WIN " and then take the next character as directed in version.substr(4,1) you get this:

Version Strings after version.substr(4,1);
Flash 9 : 9
Flash 10: 1

here is a function you can wrap the getVersion with and get the correct flash player major version number.

	function getVersionFromString(versionString) {               
		var versionStringArray = versionString.split(" ");        
		var versionNumberArray = versionStringArray[1].split(",");
		var versionMajorNumber = versionNumberArray[0];           
		return versionMajorNumber;                                
	}                                                           
	
	var version = getVersionFromString(getVersion());
	if (version < 8)
		// tell user to upgrade
	}
	
	



That should fix your problems, let me know if you have any other issues.







2008 scandalz.net
Albert Einstein, when asked to describe radio, replied: "You see, wire telegraph is a kind of a very, very long cat. You pull his tail in New York and his head is meowing in Los Angeles. Do you understand this? And radio operates exactly the same way: you send signals here, they receive them there. The only difference is that there is no cat."
CountryUS
IP Address38.107.191.95
User AgentCCBot/1.0 (+http://www.commoncrawl.org/bot.html)