# Simple swf comunication

**URL:** <https://forum.kirupa.com/t/simple-swf-comunication/177753>\
**Category:** Uncategorized\
**Created:** [February 4, 2006, 9:19pm UTC](https://forum.kirupa.com/t/simple-swf-comunication/177753 "2006-02-04T21:19:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kingofnukes](https://avatars.discourse-cdn.com/v4/letter/k/9d8465/32.png) [@kingofnukes](https://forum.kirupa.com/u/kingofnukes)\
**Post date:** [February 4, 2006, 9:19pm UTC](https://forum.kirupa.com/t/simple-swf-comunication/177753/1 "2006-02-04T21:19:41Z")

</div>

OK. I have an SWF loaded into another. One is sposed’ to declare the \_global variable “Closed” as true on its last frame. I wanted the main swf that loads this one to pick this vvariable up and gotoAndPlay(“close”); when this variable is sent back as true. How can I do this?

Thanx in advance.

I tried using a localConnection but it didnt seem to work.

I got

ActionScript Code:  
[FONT=Courier New][LEFT]my\_lc = [COLOR=#000000] **new** [/COLOR] [COLOR=#0000ff]LocalConnection[/COLOR]COLOR=#000000[/COLOR];\</p\>  
\<p\>my\_lc.[COLOR=#0000ff]send[/COLOR][COLOR=#000000]([/COLOR][COLOR=#ff0000]"\_myLocalConnection"[/COLOR], [COLOR=#ff0000]“recievedValue”[/COLOR], [COLOR=#ff0000]“Close”[/COLOR][COLOR=#000000])[/COLOR];  
[/LEFT]  
[/FONT]

on My loaded movie’s last frame

and…  
[AS]myReceiving\_lc = new LocalConnection();  
myReceiving\_lc.connect("\_myLocalConnection");  
myReceiving\_lc.recievedValue = function(Close) {  
gotoAndPlay(“close”);  
};[/AS]  
on my main movie’s frame where the movie is loaded
