Setrate (Microphone.setrate Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

Parameters
- An integer that specifies the amount by which the microphone should boost
gain:Number
the signal. Valid values are 0 to 100. The default value is 50; however, the user may change
this value in the Flash Player Microphone Settings panel.
Example
The following example uses a ProgressBar instance called
NumericStepper instance called
this.createEmptyMovieClip("sound_mc", this.getNextHighestDepth());
var active_mic:Microphone = Microphone.get();
sound_mc.attachAudio(active_mic);
gain_pb.label = "Gain: %3";
gain_pb.mode = "manual";
gain_pb.setProgress(active_mic.gain, 100);
gain_nstep.value = active_mic.gain;
function changeGain() {
active_mic.setGain(gain_nstep.value);
gain_pb.setProgress(active_mic.gain, 100);
}
gain_nstep.addEventListener("change", changeGain);
The
MovieClip.getNextHighestDepth()
7 or later. If your SWF file includes a version 2 component, use the version 2 components
DepthManager class instead of the
See also
gain (Microphone.gain property)
(Microphone.setUseEchoSuppression method)

setRate (Microphone.setRate method)

public setRate(rate:Number) : Void
Sets the rate, in kHz, at which the microphone should capture sound.
Availability: ActionScript 1.0; Flash Player 6
Parameters
- The rate at which the microphone should capture sound, in kHz. Acceptable
rate:Number
values are 5, 8, 11, 22, and 44. The default value is 8 kHz if your sound capture device
supports this value. Otherwise, the default value is the next available capture level above 8
kHz that your sound capture device supports, usually 11 kHz.
to set the microphone's gain value.
gain_nstep
method used in this example requires Flash Player
MovieClip.getNextHighestDepth()
,
setUseEchoSuppression
to display and a
gain_pb
method.
Microphone
797

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF