views:

50

answers:

1

Hi all,

we are working on a project involving lots of flash remoting stuff. Particularly, we build on Flex Builder 3 using Flex SDK 3.2.

An interesting question here: when a connection to the remote server (FluorineFX-based) is established, and we issue a call via NetConnection.call(), is it allowed to place another NetConnection call inside a responder callback invoked by the server?

Example:

server.call( server.someFunction, onSuccess );
function onSuccess() : void {
    // do something and issue another call
    server.call( server.anotherFunction, onAnotherSuccess );
}

, where server is an abstraction that internally uses NetConnection.call to issue a call to the specified function (e.g. server.someFunction, which is a string constant).

Considering the asynchronous nature of the NetConnection implementation in AS3, I suppose this might at least be unsafe. Nevertheless we have working code doing exactly that.

Unfortunately, we are experiencing occasional crashes of the browser's plugin container hosting Flash (10.1) and NetConnection.Connect.Failed problems currently. Could this be related to something going wrong with this kind of nested calls?

Thanks in advance for any clue on this.

Tobias