Microphone.gain 463
Microphone.activityLevel
Availability
Flash Player 6.
Usage
activeMicrophone.activityLevel
Description
Read-only property; a numeric value that specifies the amount of sound the microphone is
detecting. Values range from 0 (no sound is being detected) to 100 (very loud sound is being
detected). The value of this property can help you determine a good value to pass to
Microphone.setSilenceLevel() method.
If the microphone is available but is not yet being used because
Microphone.get() has not been
called, this property is set to -1.
Example
The following example sets the variable level to the activity level of the current microphone,
myMic.activityLevel.
var level = myMic.activityLevel;
See also
Microphone.setGain()
Microphone.gain
Availability
Flash Player 6.
Usage
activeMicrophone.gain
Description
Read-only property; the amount by which the microphone boosts the signal. Valid values are 0
to 100. The default value is 50.
Example
The following example is attached to the nib of a slide bar. When this clip is loaded, Flash checks
for the value
myMic.gain and provides a default value if this value is undefined. The _x position
is then used to set the gain on the microphone to the user’s preference.
onClipEvent (load) {
if (_root.myMic.gain == undefined) {
_root.myMic.setGain = 75;
}
this._x = _root.myMic.gain;
_root.txt_micgain = this._x;
left = this._x;
right = left+50;