「グループ」チャットでない限り、これらすべてに NetStream を使用できます。グループ チャットの場合は共有オブジェクトが必要で、1 対 1 のチャットの場合は NetStream を使用できます。次のようになります。
var connection:NetConnection = new NetConnection();
connection.connect(yourServerIp);
var stream:NetStream = new NetStream(connection);
stream.receiveAudio(true);
stream.receiveVideo(true);
stream.attachAudio(Microphone.getMicrophone());
stream.attachVideo(Camera.getCamera());
stream.client = this; // Yous should look this up. This is for client to client communication using a 'handler' within this class
stream.publish('media');
stream.play('media');
このことから、次のようなメッセージ機能を使用して互いにチャットできます。
private function message(someMessage:String):void
{
// do something
}
クライアントが次のようなメッセージを送信できるようにする必要があります。
stream.send('message', yourMessage);
お役に立てれば。