質問

i am connecting successfully to an fms with the following command:

netConnection = new NetConnection();
netConnection.addEventListener(NetStatusEvent.NET_STATUS, netStatusHandler);
netConnection.client = new Object();
netConnection.connect( AppConfig.FMS_ADDRESS );

now in the event handler:

if ( event.info.code == "NetConnection.Connect.Success" ) {
    trace( netConnection.client.id );
    remoteSlices = SharedObject.getRemote( "slices", netConnection.uri, true );
    remoteSlices.addEventListener( SyncEvent.SYNC, onRemoteSync );
    remoteSlices.connect( netConnection );
}

my problem is, that the netConnection.client.id is undefined, while at the same time on the server i can trace the client id without a problem.

what am i doing wrong here?

役に立ちましたか?

解決

The netConnection.client is an empty object, just as you defined it to be, with the following line:

netConnection.client = new Object();

To retrieve the id of the client you'll have to send it from the server to the client. I'm sure you know how to do that :).

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top