views:

501

answers:

2

swfobject.getFlashPlayerVersion doesn't work in IE, any alternatives?

A: 

If your flash version is 10.0.12 then the following code allows you to retrieve the version nr:

var playerVersion = swfobject.getFlashPlayerVersion(); // returns a JavaScript object
var majorVersionNr = playerVersion.major; //returns the major nr: 10
var minorVersionNr = playerVersion.minor; //returns the minor nr: 0
var releaseVersionNr = playerVersion.release; //returns the version nr: 12
Zaagmans
the problem im having is that in IE when i try the following: playerVersion.major == "0" and if i dont have Flash installed IE doesnt not recognise the command
combi001
so playerVersion == null? Doesn't that say enough then?
Zaagmans
+2  A: 

Just a thought: try swfobject.hasFlashPlayerVersion(versionStr) instead.

David Hanak
good idea, it asks for a minimum flash version and returns a boolean if the minimum is met...
Zaagmans