# External SWF realted question to access the button from another swf file?

**URL:** <https://forum.kirupa.com/t/external-swf-realted-question-to-access-the-button-from-another-swf-file/328147>\
**Category:** flash\
**Created:** [April 22, 2012, 8:16pm UTC](https://forum.kirupa.com/t/external-swf-realted-question-to-access-the-button-from-another-swf-file/328147 "2012-04-22T20:16:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![learner\_7n](https://avatars.discourse-cdn.com/v4/letter/l/b2d939/32.png) [@learner\_7n](https://forum.kirupa.com/u/learner_7n)\
**Post date:** [April 22, 2012, 8:16pm UTC](https://forum.kirupa.com/t/external-swf-realted-question-to-access-the-button-from-another-swf-file/328147/1 "2012-04-22T20:16:24Z")

</div>

Hi,

I have a **main.swf** file. From that file I am accessing the **external.swf** file which is an external file.

Now, how can I write code on my **main.swf** file for the button which is on my **external.swf** file?

Activities.MainPanel.close\_btn.addEventListener(MouseEvent.CLICK, btnClickClose);

**[COLOR=#ff0000]Activities.MainPanel.close\_btn[/COLOR]** (This buttons is actually on **external.swf** file, but I want to write code on **main.swf** file to execute it on **external.swf** ) how can I control one [COLOR=#ff0000] **swf** [/COLOR] button on other \*\*[COLOR=#ff0000]swf [/COLOR]\*\*file?

Thanks.
