Microphone
789
When the user responds to this dialog box, the
Microphone.onStatus
event handler returns
an 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.muted
.
The user can also specify permanent privacy settings for a particular domain by right-clicking
(Windows) or Control-clicking (Macintosh) while a SWF file is playing, choosing Settings,
opening the Privacy panel, and selecting Remember.
You can't use ActionScript to set the Allow or Deny value for a user, but you can display the
Privacy panel for the user by using
System.showSettings(0)
. If the user selects Remember,
Flash Player no longer displays the Privacy dialog box for SWF files from this domain.
If
Microphone.get()
returns
null
, either the microphone is in use by another application,
or there are no microphones installed on the system. To determine whether any microphones
are installed, use
Microphones.names.length
. To display the Flash Player Microphone
Settings panel, which lets the user choose the microphone to be referenced by
Microphone.get()
, use
System.showSettings(2)
.
Availability:
ActionScript 1.0; Flash Player 6 - Note: The correct syntax is Microphone.get().
To assign the Microphone object to a variable, use syntax like active_mic = Microphone.get().
Parameters
index
:Number
[optional] - A zero-based integer that specifies which microphone to get, as
determined from the array that
Microphone.names
contains. To get the default microphone
(which is recommended for most applications), omit this parameter.
Returns
Microphone
-
■
If
index
is not specified, this method returns a reference to the default microphone or, if it
is not available, to the first available microphone. If no microphones are available or
installed, the method returns
null
.
■
If
index
is specified, this method returns a reference to the requested microphone, or
null
if it is not available.
Example
The following example lets the user specify the default microphone, and then captures audio
and plays it back locally. To avoid feedback, you may want to test this code while wearing
headphones.
this.createEmptyMovieClip("sound_mc", this.getNextHighestDepth());
System.showSettings(2);
Содержание FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Страница 1: ...ActionScript 2 0 Language Reference ...
Страница 1352: ...1352 ActionScript classes ...