# Communication between swf's

**URL:** <https://forum.kirupa.com/t/communication-between-swfs/182758>\
**Category:** flash\
**Created:** [March 21, 2006, 9:05am UTC](https://forum.kirupa.com/t/communication-between-swfs/182758 "2006-03-21T09:05:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bpdp](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@bpdp](https://forum.kirupa.com/u/bpdp)\
**Post date:** [March 21, 2006, 9:05am UTC](https://forum.kirupa.com/t/communication-between-swfs/182758/1 "2006-03-21T09:05:40Z")

</div>

Hello,  
I want my menu and my main swf’s to be in separate files. How do you control the playhead of main.swf with menu.swf?

To clarify I will NOT be loading menu.swf into main.swf – they will be two separate files on one HTML page.

Any help would be great. Thanks

---

<div class="post-metadata">

**Author:** ![kernel\_flash](https://avatars.discourse-cdn.com/v4/letter/k/a87d85/32.png) [@kernel\_flash](https://forum.kirupa.com/u/kernel_flash)\
**Post date:** [March 21, 2006, 9:10am UTC](https://forum.kirupa.com/t/communication-between-swfs/182758/2 "2006-03-21T09:10:17Z")

</div>

You can do this using LocalConnection object.  
More help can be found in flash documentation.

---

<div class="post-metadata">

**Author:** ![bpdp](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@bpdp](https://forum.kirupa.com/u/bpdp)\
**Post date:** [March 22, 2006, 7:46am UTC](https://forum.kirupa.com/t/communication-between-swfs/182758/3 "2006-03-22T07:46:30Z")

</div>

Thanks,  
I was wondering if someone could look at my files and see what i’m doing wrong. This is all new to me.

---

<div class="post-metadata">

**Author:** ![kernel\_flash](https://avatars.discourse-cdn.com/v4/letter/k/a87d85/32.png) [@kernel\_flash](https://forum.kirupa.com/u/kernel_flash)\
**Post date:** [March 22, 2006, 9:10am UTC](https://forum.kirupa.com/t/communication-between-swfs/182758/4 "2006-03-22T09:10:24Z")

</div>

Find the solution in attached zip file.

You made two mistakes.

1. used btn2 to send the information to informing.swf  
You should be using the localConnection object.

2. added EventListner to button.  
Flash button object have by default event listeners like onRelease.  
No need to attach it using addEventListener.

Hope you are clear now.

---

<div class="post-metadata">

**Author:** ![bpdp](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@bpdp](https://forum.kirupa.com/u/bpdp)\
**Post date:** [March 22, 2006, 9:38am UTC](https://forum.kirupa.com/t/communication-between-swfs/182758/5 "2006-03-22T09:38:51Z")

</div>

:beam: Oh my god thank you so much.
