1

Well yeah, it sounds funny, but all I want is to read the value of Capabilities.version to get the right version of the Flash player? I have tried getting the version info from swfObject library, but it doesn't give the complete version info: http://www.adobe.com/devnet/flashplayer/articles/swfobject.html

FP version info have 4 numbers: major, minor, release and build. I couldn't find an API which can give me all four on all browsers without loading SWF. Hence I am looking for help here.

3
  • Why not create a teeny tiny SWF just for this purpose? Commented Sep 27, 2011 at 19:02
  • I think I'll have to do that only, I was looking for a cleaner approach Commented Sep 27, 2011 at 20:18
  • You don't have to add a swf to a object with flash type to get the version of the plugin. You just need to add the object to the dom Commented Sep 27, 2011 at 21:25

2 Answers 2

1

SWFObject has a detection function built into it and for the most part it is cross-browser capable.
The function name is getFlashPlayerVersion
It returns an object with 3 attributes major, minor,release

[EDIT]
SWFObject also has a function called testPlayerVersion.
I shortened it up for you but I think it gets what you want.

var o = createElement(OBJECT);
o.setAttribute("type", FLASH_MIME_TYPE);
alert( doc.getElementsByTagName("body")[0].appendChild(o).GetVariable("$version") )
doc.getElementsByTagName("body")[0].removeChild(o);


Remember this is not browser compliant.
Pretty sure you need to test for plugin or active x also.

Sign up to request clarification or add additional context in comments.

5 Comments

I know that and that's why I mentioned it doesn't give full info. I need the build info as well.. for some bug with a specific release.
Release is the build info. Or am I missing something.
Found a much better test you might be able to add to code.google.com/p/doctype/wiki/ArticleDetectFlash
Thanks the_asMan but I have already tried getFlashPlayerVersion. Everything gives me 3 numbers not fourth! Same does your link above. I'll rather have to go with creating my own swf itself.
Did you try the code I posted It works for the plugin but not for ActiveX so you are half way there.
0

You do not need to load flash to know what is the version of the player. There for is JS.

http://www.featureblend.com/javascript-flash-detection-library.html

1 Comment

Thanks but swfObject does the same thing, now I tend to believe that there is a technical limitation on getting the complete flash version from JS

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.