Client-Side Communication ActionScript > NetStream.attachAudio |
![]() ![]() ![]() |
NetStream.attachAudio
Availability
![]() |
Flash Player 6. |
![]() |
Flash Communication Server MX. |
Usage
myStream
.attachAudio(source
)
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.
srcStream.attachAudio(myMic);
See also
Microphone (object), MovieClip.attachAudio
, NetStream.attachVideo
, NetStream.publish
, NetStream.receiveAudio
![]() ![]() ![]() |