Yesterday i tried to implement the basic functions for a framework debugger tool. When i opened the SWF’s in Firefox or via the standalone Flash Player the local connection was working.

Between the AIR application launched by Flex and the swf in the Browser the local connection was not working.

Why is explained here: http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7c7e.html

If the string for connectionName does not begin with an underscore, the runtime adds a prefix with the superdomain name and a colon (for example, myDomain:connectionName). Although this ensures that your connection does not conflict with connections of the same name from other domains, any sending LocalConnection objects must specify this superdomain (for example, myDomain:connectionName). If you move the HTML or SWF file with the receiving LocalConnection object to another domain, the runtime changes the prefix to reflect the new superdomain (for example, anotherDomain:connectionName). All sending LocalConnection objects have to be manually edited to point to the new superdomain.

Solution: When you want to build a tool which communicates with swfs in browser use a underscore (“_”) as prefix for the connection names.

Leave a Reply