466
Chapter 12: ActionScript Dictionary
Example
The following example lets the user specify the default microphone, then captures audio and plays
it back locally. To avoid feedback, you may want to test this code while wearing headphones.
System.showSettings(2);
myMic = Microphone.get();
_root.attachAudio(myMic);
See also
Microphone.index
,
Microphone.muted
,
Microphone.names
,
Microphone.onStatus
,
MovieClip.attachAudio()
Microphone.index
Availability
Flash Player 6.
Usage
activeMicrophone
.index
Description
Read-only property; a zero-based integer that specifies the index of the microphone, as reflected
in the array returned by
Microphone.names
.
See also
Microphone.get()
,
Microphone.names
Microphone.muted
Availability
Flash Player 6.
Usage
activeMicrophone
.muted
Description
Read-only property; a Boolean value that specifies whether the user has denied access to the
microphone (
true
) or allowed access (
false
). When this value changes,
Microphone.onStatus
is invoked. For more information, see
Microphone.get()
.
Example
In the following example, when the user clicks the button, Flash publishes and plays a live stream
if the microphone is not muted.
on (press)
{
// If the user mutes microphone, display offline notice.
// Else, publish and play live stream from microphone.
if(myMic.muted) {
_root.debu="Microphone offline." + newline;
} else {
Summary of Contents for FLASH MX 2004 - ACTIONSCRIPT
Page 1: ...ActionScript Reference Guide...
Page 8: ...8 Contents...
Page 12: ......
Page 24: ...24 Chapter 1 What s New in Flash MX 2004 ActionScript...
Page 54: ...54 Chapter 2 ActionScript Basics...
Page 80: ...80 Chapter 3 Writing and Debugging Scripts...
Page 82: ......
Page 110: ...110 Chapter 5 Creating Interaction with ActionScript...
Page 112: ......
Page 120: ...120 Chapter 6 Using the Built In Classes...
Page 176: ......
Page 192: ...192 Chapter 10 Working with External Data...
Page 202: ...202 Chapter 11 Working with External Media...
Page 204: ......
Page 782: ...782 Chapter 12 ActionScript Dictionary...
Page 793: ...Other keys 793 221 222 Key Key code...
Page 794: ...794 Appendix C Keyboard Keys and Key Code Values...
Page 798: ...798 Appendix D Writing Scripts for Earlier Versions of Flash Player...
Page 806: ...806 Appendix E Object Oriented Programming with ActionScript 1...
Page 816: ...816 Index...