Actionscript 3 如何在ActionAcript3中关闭麦克风
如何在AS3中关闭麦克风?下面是示例代码。我想通过调用closemicroscopy()函数关闭(关闭)麦克风Actionscript 3 如何在ActionAcript3中关闭麦克风,actionscript-3,microphone,Actionscript 3,Microphone,如何在AS3中关闭麦克风?下面是示例代码。我想通过调用closemicroscopy()函数关闭(关闭)麦克风 var microphone:Microphone = null; function openMicrophone():void{ if(Microphone.isSupported){ Security.showSettings(SecurityPanel.PRIVACY); microphone = Microphone.getMicroph
var microphone:Microphone = null;
function openMicrophone():void{
if(Microphone.isSupported){
Security.showSettings(SecurityPanel.PRIVACY);
microphone = Microphone.getMicrophone();
if(microphone != null){
microphone.setLoopBack();
microphone.setSilenceLevel(5, 2000);
}else{
trace('No microphone found!');
}
}else{
trace('The Microphone class is not supported on this system!');
}
}
function closeMicrophone():void{
// Here, I want to turn off microphone.
}
你想禁用麦克风环回,对吗?然后用
false
作为参数再次调用setLoopBack
方法
function closeMicrophone():void{
microphone.setLoopBack(false);
microphone = null;
}