Microphone.names

Availability

Flash Player 6.

Usage

Microphone.names

Note: The correct syntax is Microphone.names. To assign the return value to a variable, use syntax like mic_array = Microphone.names. To determine the name of the current microphone, use activeMicrophone.name.

Description

Read-only class property; retrieves an array of strings reflecting the names of all available sound capture devices without displaying the Flash Player Privacy Settings panel. This array behaves the same as any other ActionScript array, implicitly providing the zero-based index of each sound capture device and the number of sound capture devices on the system (by means of Microphone.names.length). For more information, see the Array class entry.

Calling Microphone.names requires an extensive examination of the hardware, and it may take several seconds to build the array. In most cases, you can just use the default microphone.

Example

The following code returns information on the array of audio devices.

allMicNames_array = Microphone.names;
_root.debugWindow += "Microphone.names located these device(s):" + newline;
for(i=0; i < allMicNames_array.length; i++){
  debugWindow += "[" + i + "]: " + allMicNames[i] + newline;
}

For example, the following information could be displayed.

Microphone.names located these device(s):
[0]: Crystal SoundFusion(tm)
[1]: USB Audio Device

See also

Array class, Microphone.name