flex 如何判断player的版本过低,并下载最新版本呢?
开发之后的网页,在某些人的机器上无法显示。可能是player的版本过低,我想写个方法,能够判断用户版本是否是10.0,如果不是就下载最新版本。
请高手指教!谢谢!
[解决办法]
如果你用flex建立的项目则项目下有一个“AC_OETags.js”文件已包含版本判断的方法
使用如:
var hasRequestedVersion = DetectFlashVer(9, 0, 124);
返回true /false
试试吧,参考 默认生成的页面
[解决办法]
// Major version of Flash requiredvar requiredMajorVersion = 9;// Minor version of Flash requiredvar requiredMinorVersion = 0;// Minor version of Flash requiredvar requiredRevision = 124;// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)[color=#FF0000]var hasProductInstall = DetectFlashVer(6, 0, 65);[/color]// Version check based upon the values defined in globals[color=#FF0000]var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);[/color] if (hasRequestedVersion) { // if we've detected an acceptable version // embed the Flash Content SWF when all tests are passed } else { // flash is too old or we can't detect the plugin }
[解决办法]
// Major version of Flash requiredvar requiredMajorVersion = 9;// Minor version of Flash requiredvar requiredMinorVersion = 0;// Minor version of Flash requiredvar requiredRevision = 124;// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)var hasProductInstall = DetectFlashVer(6, 0, 65);// Version check based upon the values defined in globalsvar hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision); if (hasRequestedVersion) { // if we've detected an acceptable version // embed the Flash Content SWF when all tests are passed } else { // flash is too old or we can't detect the plugin }
[解决办法]
flash.system.Capabilities.version;//播放器版本
flash.system.Capabilities.playerType;//播放器类型(Firefox(Plugin),IE(ActiveX))