对我来说正确的方法是制作两个不同的视频播放器和一个加载器 swf。Loader swf 的目的是获取 FP 版本和加载高效的视频播放器。您也可以构建一个视频播放器,但分开做会更干净、更好。
从该站点获取版本的示例代码-> http://www.mediacollege.com/adobe/flash/actionscript/3/player-version.html
var flashVersion:Object = new Object();// Object to hold the Flash version details
function getPlayerVersion() {
var versionNumber:String = Capabilities.version;// Get the whole version string
var versionArray:Array = versionNumber.split(",");// Split it up
var length:Number = versionArray.length;
var osPlusVersion:Array = versionArray[0].split(" ");// The main version contains the OS (e.g. WIN), so we split that off as well.
// Populate the version object (the OS is a string, others are numbers):
flashVersion["os"] = osPlusVersion[0];
flashVersion["major"] = parseInt(osPlusVersion[1]);
flashVersion["minor"] = parseInt(versionArray[1]);
flashVersion["build"] = parseInt(versionArray[2]);
// Test the output:
trace(flashVersion["os"]);
trace(flashVersion["major"]);
trace(flashVersion["minor"]);
trace(flashVersion["build"]);
}