Search code examples
actionscript-3actionscript

List all LocalConnection channels open in the page


Is it possible to list all channels initiated by LocalConnections from other SWF files?

I have an embed SWF file that creates a LocalConnection using a random number for the channel, and I would like to get connected to that channel, using another SWF I am building. However, I see no way I can connect to it, unless I know the channel's name.

Thank you.


Solution

  • No, unfortunately, it's not possible.

    If your embed swf is AS3 based you can pass LC name to it when swf is loaded (or listen for the name in event from it, not difference), if it's AS2 the only way to pass variables is to load it with Loader by URL (not as embed bytes) and pass param via query, like "as2file.swf?lcname=_mylcname"