Macromedia flash media server 2-client-side actionscript language reference for flash media server 2 Benutzerhandbuch

Seite von 156
104
Client-Side ActionScript Language Reference
Example
The following example shows how to publish and record a video, and then play it back:
var my_nc:NetConnection = new NetConnection();
my_nc.connect("rtmp://myServer.myDomain.com/appName/appInstance");
var src_ns:NetStream = new NetStream(my_nc);
src_ns.publish("stephen", "record");
src_ns.attachVideo(Camera.get());
// to stop publishing and recording
src_ns.publish(false);
// to play the recorded stream
src_ns.play("stephen");
See also
NetStream.receiveAudio()
Availability
Flash Player 6.
Flash Communication Server MX 1.0.
Usage
public receiveAudio(receive : Boolean) : Void
Parameters
receive
  A Boolean value that specifies whether incoming audio plays on the specified 
stream (
true
) or not (
false
). The default value is 
true
Returns
Nothing.
Description
Method; specifies whether incoming audio plays on the specified stream. This method is 
available only to clients subscribed to the specified stream, not to the stream’s publisher.
You can call this method before or after you call the 
 method and actually 
begin receiving the stream. For example, you can attach these methods to a button the user 
clicks to mute and unmute the incoming audio stream.