The question relates to having multiple (unique) LocalConnection objects:

I have a Flash Builder 4 Beta 2 project that uses localConnections to send and receive commands between multiple swf files. Each swf file is loaded into the master Flex application through a standard Loader object.

Now, the issue is creating multiple localConnections to multiple swf files. I can successfully load a single swf file, establish a localConnection to it and broadcast data (continually from a Event.ENTER_FRAME function). I want the loaded swf to receive consistent data (such as a video's playheadTime).

So, one works just fine. However, when I want to load 2 swf files and broadcast data (continually) the speed drops tremendously slow. I can successfully create the multiple connections (using a single localConnection or creating individual, unique localConnections) - but the speed drops to nothing.

So, the question is how do I create multiple localConnections so that the main Flex application can broadcast data (continually) to different swf files (loaded via Loader objects).

I have tried a significant number of things, including the creation of individual (unique) localConnections that would send data to each swf file on a specific channel. That works but (again) the speed drops to practically nothing. Meaning if more than 2 swf files are receiving data it isn't fast. There are large delays between updates (even after the _sender object has sent data.

The objectProxy looks interesting. I'll look into it. For now, here's a description of what's going on. ( I hope I can explain it clearly)

Basically I've got the main application which loads other swf file inside it. The main app has two localConnections, a "_receiver" for receiving commands and a "_sender" for sending commands (to the loaded swf files)

Now, each loaded swf file also contains it's own sender and receiver localConnections. When the swf is first loaded into the main application, it sends a command telling the main application to start broadcasting information to it.

Inside the main application is an array, called broadcast. The array holds an array of strings. Each time a swf file is loaded, the swf file sends a command to the main application to add another string to the array. This string is the name of the receiver localConnection inside each swf file. (each string is unique).

Each time a EVENT.ENTER_FRAME event is fired (in the main app), it calls a function to cycle through each string (swf receiver) and broadcast information to a function inside it.

1. So, let's go through this one more time. In the main application we have two localConnections and an array:

This works perfectly well when there is one swf loaded. When I have two or more, the speed of the updates drops (becomes very slow)

I have tried replacing the addEventListener(Event.ENTER_FRAME, broadcasts) with a Timer-based method but the same slowness persists.

I have also tried creating UNIQUE _senders in the hopes that having dedicated senders (per swf) would resolve this. However, it just seems Flash Builder 4 is capable of only really handling ONE outbound localConnection. Anything more than one just breaks down.