Hey guys, I’m having a little trouble with calling send() on a netstream.

I am using Flash CS4, programming with AS3

I’m trying to make a P2P Video Conference, and want to periodically send data from one client to another.

This is what I have:

function startPublishing():void {

[INDENT]publishStream = new NetStream(connection, NetStream.DIRECT_CONNECTIONS);

var publishStreamClient:Object = new Object();
publishStreamClient.onPeerConnect = function(callerns:NetStream):Boolean {
[INDENT]trace("Connected to " + callerns.farID);
return true;[/INDENT]
publishStream.client = publishStreamClient;


function startPlaying(playID:String):void {

[INDENT]playStream = new NetStream(connection, playID);

playStream.client = this;


function doSomeStuff(str:String):void {


Then, later in the code, I try calling

[INDENT]publishStream.send(“doSomeStuff”, “HELLO THERE!!!”);[/INDENT]

… but I never get the trace message “HELLO THERE” !!! What is wrong here!!!

Thanks so much for the help!