# AS3 connect to external swf - local connection

**URL:** <https://forum.kirupa.com/t/as3-connect-to-external-swf-local-connection/266662>\
**Category:** flash\
**Created:** [July 23, 2008, 4:37am UTC](https://forum.kirupa.com/t/as3-connect-to-external-swf-local-connection/266662 "2008-07-23T04:37:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tdiddyd](https://avatars.discourse-cdn.com/v4/letter/t/bc79bd/32.png) [@tdiddyd](https://forum.kirupa.com/u/tdiddyd)\
**Post date:** [July 23, 2008, 4:37am UTC](https://forum.kirupa.com/t/as3-connect-to-external-swf-local-connection/266662/1 "2008-07-23T04:37:07Z")

</div>

I have a container SWF that houses a loaded SWF within it . I need a button on the loaded swf to connect to the container swf and run the same function that a button on the container swf runs. This is the code pertaining to the container swf button:

private function onPauseBtnClick(event:MouseEvent):void  
{  
if (showPlayPauseBtn)  
{  
playBtn.visible = true;  
pauseBtn.visible = false;  
}  
autoplay = false;  
autoplayTimer.stop();  
}

I have begun to read about and tried messing around with local connection. Can anyone help me with the script I would need on the send and receive swf? They are both AS3.  
THANKS!!
