How do LocalConnections in AS3 communicate?

I'm going to start using LocalConnections in a SWF pair to let them talk to each other. But before I go down that road, I need to make sure that it doesn't cause pop-ups and confirmation dialogs from the system.

If I use a local socket server, it makes Windows Firewall and many others mark it and ask for confirmation. So if LocalConnection is using sockets, I cannot use it.

But I read through some web search that it does indeed work using shared memory, which won't trigger any firewalls.

Can anyone who has used LocalConnection confirm or deny that it is causing problems with the host OS? In particular with Win7 / Vista.

+2


source to share


3 answers


I have used for a long time LocalConnection

(to see trace messages of my server hosted in SWF) and have never seen any popups. The liveDocs page LocalConnection

states that:

LocalConnection objects created in ActionScript 3.0 can bind to LocalConnection objects created in ActionScript 1.0 or 2.0. The converse is also true. Flash Player handles this communication between different versions of LocalConnection objects automatically.



So I guess it is safe to assume that the flash player is responsible for communicating between swfs using LocalConnection and no popups will be involved in it.

+2


source


I found this link which proves LocalConnections work with shared memory synchronized with a mutex.



But this is a bit old (2007) and I am currently working with Flash 10 player using AS3.

+1


source


I used LocalConnection in a fairly extensive QA testing environment. There are a few strange things about this, but overall it works reliably across platforms with no user impact.

Of the odd things: One of the problems we faced was that the memory file and mutexes are not released until all instances of the flash player on the computer are disabled. This is a problem in case one of the flash player instances died or was killed and did not release LocalConnection. An arbiter that can pass to flashvars telling each SWF which local connections to use at runtime allows you to specify a new local connection each time. Of course, if this happens a lot, it will make the problem worse, filling up the memory ...

Another problem is that it seems like the implementation of the mutex might be somewhat naive. Adding too many listeners / senders to a single local connection is somewhat unreliable. We avoided this problem by simply using LocalConnections as one dispatch method, one sender, one receiver. This issue is well documented here

+1


source







All Articles