【发布时间】:2010-12-12 17:26:13
【问题描述】:
我想知道是否可以根据 ActionScript 3 中的 Flash Player 版本启用/禁用某些代码。
比方说;我有一个使用flash.media.Microphone 的自定义类customClass。 Microphone 类有一个属性isSupported,它可用于Flash Player 10.1 及更高版本(如文档中所述)。我在我的 customClass 中实现了这个属性......所以:
我需要这样的东西(通过检查内置的Capabilities.version):
if (version >= 10.1) {
trace(_mic.isSupported); //this will throw an error if the debug version is not 10.1 or later
} else {
doSmthElse();
}
有没有办法做到这一点?
【问题讨论】:
标签: actionscript-3 actionscript version flash detection