# Problem with LocalConnection Objects

**URL:** <https://forum.kirupa.com/t/problem-with-localconnection-objects/187073>\
**Category:** flash\
**Created:** [April 26, 2006, 3:18pm UTC](https://forum.kirupa.com/t/problem-with-localconnection-objects/187073 "2006-04-26T15:18:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![artISgarbage](https://avatars.discourse-cdn.com/v4/letter/a/97f17d/32.png) [@artISgarbage](https://forum.kirupa.com/u/artISgarbage)\
**Post date:** [April 26, 2006, 3:18pm UTC](https://forum.kirupa.com/t/problem-with-localconnection-objects/187073/1 "2006-04-26T15:18:27Z")

</div>

Hey all…

I’m having problems sending variables inbetween two SWF’s on the same HTML page using the LocalConnection Object. Any help would be awesome.

Here’s the code:

\*\*// Main .swf AS with send()  
OwnerVar, InterestVar, have been defined throught other listener functions.  
\*\*  
function Click () {  
var lcSender:LocalConnection = new LocalConnection();  
var ownerValue = (OwnerVar);  
var interestValue = (InterestVar);  
var townValue = (TownVar);  
var establishedValue = (EstablishedVar);  
var acreageValue = (AcreageVar);  
var shorelineValue = (ShorelineVar);  
var thumbnailValue = (ThumbnailVar);  
lcSender.send(“aConnection”, “someMethod”, ownerValue, interestValue, townValue, establishedValue, acreageValue, shorelineValue, thumbnailValue);  
trace(“send occured”);  
}

btn\_1.onRelease = function () {  
Click();  
}

**// Receiving .swf displaying ownerValue in result\_txt (shows up undefined)**

var lcReceiver:LocalConnection = new LocalConnection();  
lcReceiver.someMethod = function(ownerValue, interestValue, townValue, establishedValue, acreageValue, shorelineValue, thumbnailValue){  
trace(“method called”);  
trace(ownerValue);  
trace(interestValue);  
trace(townValue);  
trace(establishedValue);  
trace(acreageValue);  
trace(shorelineValue);  
trace(thumbnailValue);  
};  
lcReceiver.connect(aConnection);

result\_txt.htmlText = this.ownerValue;  
result\_txt.border = true;  
result\_txt.wordWrap = true;
