有没有人成功尝试在Adobe Flash CS5中使用Microphone.getEnhancedMicrophone()方法?
我尝试了所有这些步骤;
Step 1: Go to the locaiton C:\Program Files\Adobe\Adobe Flash CS5\Common\Configuration\ActionScript 3.0
Step 2: Create a new folder with the name "FP10.3"
Step 3: Copy the file and paste it in the following location:
C:\Program Files\Adobe\Adobe Flash CS5\Common\Configuration\ActionScript 3.0\FP10.3
Step4: Rename the swc name to "playerglobal.swc"
Step 5: Goto the following location C:\Program Files\Adobe\Adobe Flash CS5\Common\Configuration\Players
Step 6: Create a copy of "FlashPlayer10_1.xml" and rename as "FlashPlayer10_3.xml"
Step 7: Open it in an editor and change according to below:
<player id="FlashPlayer10.3" version="12" asversion="3">
<name>Flash Player 10.3</name>
<path builtin="true"/>
<path platform="WIN">Device Central/adcdl.exe</path>
<path platform="MAC">Device Central/adcdl</path>
<playerDefinitionPath as2="$(UserConfig)/Classes/FP10;$(UserConfig)/Classes/FP9;$(UserConfi g)/Classes/FP8;$(UserConfig)/Classes/FP7" as3="$(AppConfig)/ActionScript 3.0/FP10.3/playerglobal.swc" />
Step 8: Close the flash application if launched and restart the flash application.
Step 9: If you promptly followed everything you will Flash player 10.3 in the target players from the publish settings and change your target to flash player 10.3.
Step 10: Now import two statements:
import flash.media.Microphone;
import flash.media.MicrophoneEnhancedMode;
然而,现在当我尝试调用函数Microphone.getEnhancedMicrophone()时出现错误 - TypeError: Error #1006: getEnhancedMicrophone is not a function
在谷歌搜索后,我发现我需要使用-swf-version=12
作为参数进行编译,但这似乎适用于flex,我无法弄清楚如何使用Flash CS5。
任何帮助将不胜感激。
由于
答案 0 :(得分:2)
我有一个类似的问题,转而使用播放器10.1的Flash Professional CS4:Flash Player 10.1 for Flash Professional CS4 playerglobal.swc?
你用“测试电影”编译程序吗?尝试“调试电影”。
测试影片使用内置的Flash播放器(或至少用它来这样做),遗憾的是,这是不可更新的。您可以通过运行以下测试影片来确定它的版本:
import flash.system.Capabilities;
trace(Capabilities.version);
Debug Movie将使用驻留在FlashCS5 > Players
文件夹中的调试播放器编译和启动项目,并且由于该目标播放器为10.3,因此不应再收到任何错误。