Microphone.get() - MACROMEDIA FLASH MX 2004-ACTIONSCRIPT LANGUAGE Reference

Actionscript language reference
Table of Contents

Advertisement

Microphone.get()

Availability
Flash Player 6.
Usage
Microphone.get([index:Number]) : Microphone
Note: The correct syntax is
syntax like
active_mic = Microphone.get()
Parameters
An optional zero-based integer that specifies which microphone to get, as determined
index
from the array that
recommended for most applications), omit this parameter.
Returns
If
is not specified, this method returns a reference to the default microphone or, if it is
index
not available, to the first available microphone. If no microphones are available or installed, the
method returns
If
is specified, this method returns a reference to the requested microphone, or
index
is not available.
Description
Method; returns a reference to a Microphone object for capturing audio. To actually begin
capturing the audio, you must attach the Microphone object to a MovieClip object (see
MovieClip.attachAudio()
Unlike objects that you create using the
reference the same microphone. Thus, if your script contains the lines
mic1 = Microphone.get()
same (default) microphone.
In general, you shouldn't pass a value for
return a reference to the default microphone. By means of the Microphone settings panel
(discussed later in this section), the user can specify the default microphone Flash should use. If
you pass a value for
user prefers. You might use
audio from two microphones at the same time.
When a SWF file tries to access the microphone returned by the
for example, when you issue
box that lets the user choose whether to allow or deny access to the microphone. (Make sure your
Stage size is at least 215 x 138 pixels; this is the minimum size Flash requires to display the
dialog box.)
When the user responds to this dialog box, the
information object that indicates the user's response. To determine whether the user has denied or
allowed access to the camera without processing this event handler, use
Microphone.get()
Microphone.names
contains. To get the default microphone (which is
.
null
).
new
and
mic2 = Microphone.get()
, you might be trying to reference a microphone other than the one the
index
in rare cases—for example, if your application is capturing
index
MovieClip.attachAudio()
. To assign the Microphone object to a variable, use
.
constructor, multiple calls to
, both
; simply use the
index
—Flash Player displays a Privacy dialog
Microphone.onStatus
Microphone.get()
and
reference the
mic1
mic2
method to
Microphone.get()
Microphone.get()
event handler returns an
Microphone.muted
Microphone.get()
if it
null
method—
.
451

Advertisement

Table of Contents
loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash mx

Table of Contents