actionscript-3apache-flexflash-media-serveradobe-cirrus

Adobe Cirrus Error on Direct Connect"Property startTransmit not found on flash.net.NetStream"


The error:

ReferenceError: Error #1069: Property startTransmit not found on flash.net.NetStream and there is no default value.

I've played around with cirrus plenty of times before and have yet to see this error before. But now I cant get it to go away.

My p2p Direct connect works great just fine. But every single time i see this error pop up. It throws an exception. I can't figure out where it's exactly happening.

Has anyone encountered this before? Any ideas where I should look?


Solution

  • Every client object needs to have the following functions defined.

    client.stopTransmit=function($p1:*,$p2:*):void{
        trace("stopTransmit called",$p1,$p2);
    }
    client.startTransmit=function():void{
        trace("startTransmit called");
    }
    

    For example, set these in the onPeerConnect function:

    sendStream.client = new Object();
    sendStreamClient.onPeerConnect = function(subscriber:NetStream): Boolean{
        var client:Object=new Object();
        client.stopTransmit=function($p1:*,$p2:*):void{
            trace("stopTransmit called",$p1,$p2);
        }
        client.startTransmit=function():void{
            trace("startTransmit called");
        }
        subscriber.client=farStreamClient;
    }
    

    Additionally these need to be set on your sendStreamClient's client property:

    sendStreamClient.client.stopTransmit=function($p1:*,$p2:*):void{
        trace("stopTransmit called",$p1,$p2);
    }
    sendStreamClient.client.startTransmit=function():void{
        trace("startTransmit called");
    }
    

    And they need to be set on your recieveStreamClient's client property.