NetStream class
81
NetStream.attachAudio()
Availability
■
Flash Player 6.
■
Flash Communication Server MX 1.0.
Usage
public
attachAudio(
source
:Microphone) : Void
Parameters
source
The source of the audio to be transmitted. Valid values are a Microphone object
and
null
.
Returns
Nothing.
Description
Method; specifies whether audio should be sent over the stream (from a Microphone object
passed as
source
) or not (
null
passed as
source
). This method is available only to the
publisher of the specified stream.
You can call this method before or after you call the
NetStream.publish()
method and
actually begin transmitting. Subscribers who want to hear the audio must call a
NetStream.play()
method.
Subscribers can also attach their incoming audio to a movie clip and then create a Sound
object to control some aspects of the sound. For more information, see
MovieClip.attachAudio()
.
Example
The following code attaches a microphone to a network stream:
my_netstream.attachAudio(active_mic);
See also
Microphone class
,
MovieClip.attachAudio()
,
NetStream.attachVideo()
,
NetStream.publish()
,
NetStream.receiveAudio()