# Local Connection multiple buttons

**URL:** https://forum.kirupa.com/t/local-connection-multiple-buttons/305359
**Category:** flash
**Created:** [February 24, 2010, 12:43am UTC](https://forum.kirupa.com/t/local-connection-multiple-buttons/305359 "2010-02-24T00:43:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![loriensleafs](https://avatars.discourse-cdn.com/v4/letter/l/4491bb/32.png) [@loriensleafs](https://forum.kirupa.com/u/loriensleafs)
#### Post date: [February 24, 2010, 12:43am UTC](https://forum.kirupa.com/t/local-connection-multiple-buttons/305359/1 "2010-02-24T00:43:18Z")

</div>

Hey, I’m trying to set up a photo album, one swf is the thumbs in a div layer, and the other swf is the full size photos, each full size photo is on a frame, and all I want each thumb to do is a GotoandStop command onto the corresponding frame in the swf with the large photos.

My problem is with what I have set up right now I can only get one button to work, or one thumbnail rather. I can change the thumb nail, but I can’t seem to figure out how to define for each thumb.

Basically Can I set up code for more then one button to be able to communicate at a time, I have no idea how to expand this code.

**the code I have in the sender (the thumbs file) is:**

```auto
stop();

sending_lc = new LocalConnection();

_root.bah.thumb2_btn.onRelease = function() {
	sending_lc.send("thumb1", "execute_this", "fcOnTheWeb.com");
}

sending_lc = new LocalConnection();

```

**And the code I have on my receiver file (photo file) is:**

```auto
stop();

receiving_lc = new LocalConnection();

receiving_lc.execute_this = function(new_text) {
	_root.photos.gotoAndStop("2");
}

receiving_lc.connect("thumb1");

```

any help on how to expand this would be super appreciated!
