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
2009-03-05 10:49:33
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
2009-03-05 10:59:02
so playerVersion == null? Doesn't that say enough then?
Zaagmans
2009-03-05 20:27:48
+2
A:
Just a thought: try swfobject.hasFlashPlayerVersion(versionStr)
instead.
David Hanak
2009-03-05 12:09:41
good idea, it asks for a minimum flash version and returns a boolean if the minimum is met...
Zaagmans
2009-03-05 20:31:21