Microphone class
57
Example
The following example turns on echo suppression if the user selects a CheckBox instance
called
useEchoSuppression_ch
. The ProgressBar instance called
activityLevel_pb
displays the current activity level of the audio stream.
var useEchoSuppression_ch:mx.controls.CheckBox;
var activityLevel_pb:mx.controls.ProgressBar;
this.createEmptyMovieClip("sound_mc", this.getNextHighestDepth());
var active_mic:Microphone = Microphone.get();
sound_mc.attachAudio(active_mic);
activityLevel_pb.mode = "manual";
activityLevel_pb.label = "Activity Level: %3";
useEchoSuppression_ch.selected = active_mic.useEchoSuppression;
this.onEnterFrame = function() {
activityLevel_pb.setProgress(active_mic.activityLevel, 100);
};
var chListener:Object = new Object();
chListener.click = function(evt:Object) {
active_mic.setUseEchoSuppression(evt.target.selected);
};
useEchoSuppression_ch.addEventListener("click", chListener);
See also
Microphone.setGain()
,
Microphone.useEchoSuppression
Microphone.silenceLevel
Availability
■
Flash Player 6.
■
Flash Media Server (not required).
Usage
public silenceLevel : Number [read-only]
Description
Property (read-only); an integer that specifies the amount of sound required to activate the
microphone and invoke
Microphone.onActivity(true)
. The default value is 10.
Содержание FLASH MEDIA SERVER 2-CLIENT-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR FLASH MEDIA SERVER...
Страница 1: ...Client Side ActionScript Language Reference for Flash Media Server 2...
Страница 4: ...4 Contents...
Страница 148: ...148 Client Side ActionScript Language Reference...