# localConnection and the localhost

**URL:** <https://forum.kirupa.com/t/localconnection-and-the-localhost/294623>\
**Category:** flash\
**Created:** [August 17, 2009, 5:52pm UTC](https://forum.kirupa.com/t/localconnection-and-the-localhost/294623 "2009-08-17T17:52:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![andalusite](https://avatars.discourse-cdn.com/v4/letter/a/8e8cbc/32.png) [@andalusite](https://forum.kirupa.com/u/andalusite)\
**Post date:** [August 17, 2009, 5:52pm UTC](https://forum.kirupa.com/t/localconnection-and-the-localhost/294623/1 "2009-08-17T17:52:02Z")

</div>

I have had some success using LocalConnection between SWFs.  
I can have a connection function between a preloader SWF and its child, and another connection work between two SWFs present on the same webpage…most of the time.

If I run my SWFs in a webpage from my localhost (ie my local testing PC) a particular LocalConnection will fail about 50% of the time. If the same SWFs are run on a remote server (ie the inernet) the LocalConnection works 100% of the time.  
SWF ‘A’ is sending to SWF ‘B’  
Bizarrely, the LocalConnection going the other way, from SWF ‘B’ to SWF ‘A’ works 100%.

All the other LocalConnections I have used all work 100% of the time.

I have tried adding a listener to the eventStatus which reports when the connection fails.  
I have also tried allowDomain(), although Im not sure it is neccessary since all the SWFs are  
hosted from the same domain anyway.

Why should a LocalConnection behave differently depending on where the SWFs are hosted?
