/*!
 * 获取浏览器Flash版本号
 */
function get_flash_version() {
  var SF, FV = 0, BR = window.navigator;
  if(BR.plugins && BR.mimeTypes.length) {
    SF = BR.plugins["Shockwave Flash"];
    if(SF && SF.description) {
      FV = SF.description.replace(/[^\d\.]/g,"").split(".")[0];
    }
  } else if(BR = window.ActiveXObject) {
    try {
      SF = new BR("ShockwaveFlash.ShockwaveFlash.7");
      FV = SF.GetVariable("$version").split(" ")[1].split(",")[0];
    } catch(e) {}
  }
  return +FV;
}

标签: javascript, flash

添加新评论