# Communicate between two separate .swf files

**URL:** <https://forum.kirupa.com/t/communicate-between-two-separate-swf-files/21632>\
**Category:** Uncategorized\
**Created:** [May 24, 2003, 2:53am UTC](https://forum.kirupa.com/t/communicate-between-two-separate-swf-files/21632 "2003-05-24T02:53:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![thapanther](https://avatars.discourse-cdn.com/v4/letter/t/ba8739/32.png) [@thapanther](https://forum.kirupa.com/u/thapanther)\
**Post date:** [May 24, 2003, 2:53am UTC](https://forum.kirupa.com/t/communicate-between-two-separate-swf-files/21632/1 "2003-05-24T02:53:39Z")

</div>

hi …(long time)…  
i’m workin on a site now … and what i would like yo know is how / if i can communicate between two separate .swf files…  
what i want to do is this : i have a soundplayer… and when i go to a defrente html page (that changes only in the iframe , menu is in another iframe) i want the sound player to play another song!  
so i need somewhere to put a variable and let the sounplayer read that variable so he knows what song he needs to play (this is what i thought , could be a solution) … is this posible?  
thanks !

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 24, 2003, 5:35am UTC](https://forum.kirupa.com/t/communicate-between-two-separate-swf-files/21632/2 "2003-05-24T05:35:29Z")

</div>

It sure is. Declare a variable in \_root, and make your sound player look if that has changed. ( when a movie is loaded into another one, they share the same root )

See this thread for more information (scroll down a bit): [thread](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=22412)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 25, 2003, 9:33pm UTC](https://forum.kirupa.com/t/communicate-between-two-separate-swf-files/21632/3 "2003-05-25T21:33:00Z")

</div>

thanks , but htat one i knew …  
maybe i did explain it right, let me try again…  
i have , a html page with links to e.g. rap…, and i have soundplayer.swf wich plays songs (this on is in an iframe and is there all the time , it doesn’t get reloaded or something!) .  
what i want to do is when i click on rap, i want it to stop playing whateverit is playing , and start playing a rap beat !!  
i saw a tutorial on [avtionscript.org](http://avtionscript.org) , bt it’s in php, but since i have a free acount at brinkster i can only work with asp !! anyone ???

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 25, 2003, 9:35pm UTC](https://forum.kirupa.com/t/communicate-between-two-separate-swf-files/21632/4 "2003-05-25T21:35:31Z")

</div>

you can use the LocalConnection class to do such things…

[http://www.macromedia.com/support/flash/ts/documents/localconnection.htm](http://www.macromedia.com/support/flash/ts/documents/localconnection.htm) 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 26, 2003, 1:03am UTC](https://forum.kirupa.com/t/communicate-between-two-separate-swf-files/21632/5 "2003-05-26T01:03:35Z")

</div>

hey thanks, that’s just what i needed !! …
