Macromedia flash media server 2-client-side actionscript language reference for flash media server 2 ユーザーズマニュアル

ページ / 156
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 
 method and 
actually begin transmitting. Subscribers who want to hear the audio must call a 
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 
.
Example
The following code attaches a microphone to a network stream:
my_netstream.attachAudio(active_mic);
See also