Flash detection by JS.

Adobe has a JS file for detecting the Flash version, which is calling Flash detecting kit. However , it is a little bit mess. 

I made a clean version one. 

1. Download the AC_OETags.js

2. Create a new HTML page.

3. In head part, insert these codes:

Code

4. In body part, insert these JS codes, just follow by your Flash code:

Body Code

 

Done. You can setup the Min Flash Version requirement in JS code, and you will see a message and download flash link if the browser does not meet the your Flash version.

 =============

Update.

这个解决方案现在发现了一个bug, 当用户已经有了flash 10 player的时候,这个探测脚本仍然会提示用户升级flash,我估计可能因为这个方案出炉的时候,还没有flash 10 player,而且falsh10 改变了不少,导致了这个bug。

 

另一种解决方案, 用swfobject2 侦测flash版本, swfobject2 内置了这个功能,但我还没有在 flash10 下测试过。