MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual page 468

Actionscript reference guide
Hide thumbs Also See for FLASH MX 2004 - ACTIONSCRIPT:
Table of Contents

Advertisement

Calling
Microphone.names
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
Microphone.onActivity
Availability
Flash Player 6.
Usage
activeMicrophone.onActivity = function(activity) {
// your statements here
}
Parameters
A Boolean value set to
activity
when it stops.
Returns
Nothing.
Description
Event handler; invoked when the microphone starts or stops detecting sound. If you want to
respond to this event handler, you must create a function to process its
To specify the amount of sound required to invoke
amount of time that must elapse without sound before
invoked, use
Microphone.setSilenceLevel()
Example
The following example displays
or stops detecting sound.
m = Microphone.get();
_root.attachAudio(m);
m.onActivity = function(mode)
{
468
Chapter 12: ActionScript Dictionary
requires an extensive examination of the hardware, and it may take
when the microphone starts detecting sound,
true
.
or
in the Output panel when the microphone starts
true
false
activity
Microphone.onActivity(true)
Microphone.onActivity(false)
false
value.
, and the
is

Advertisement

Table of Contents
loading

Table of Contents