# Close swf window with a button inside of the swf

**URL:** https://forum.kirupa.com/t/close-swf-window-with-a-button-inside-of-the-swf/298108
**Category:** flash
**Created:** [October 13, 2009, 8:44pm UTC](https://forum.kirupa.com/t/close-swf-window-with-a-button-inside-of-the-swf/298108 "2009-10-13T20:44:39Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![sjbohlman](https://avatars.discourse-cdn.com/v4/letter/s/e19b73/32.png) [@sjbohlman](https://forum.kirupa.com/u/sjbohlman)
#### Post date: [October 13, 2009, 8:44pm UTC](https://forum.kirupa.com/t/close-swf-window-with-a-button-inside-of-the-swf/298108/1 "2009-10-13T20:44:39Z")

</div>

Hello All,  
I’ve been researching all day trying to figure this out.

I’ve found many ways to do it - but all of those ways are in as2.  
([http://www.actionscript.org/forums/s](http://www.actionscript.org/forums/s)…php3?t=161648)

What I need to do, is be able to close a swf with a button that is inside of that swf…in actionscrip 3.0.

I’ve found that I need to be using ExternalInterface.call(“hideFlash”); but I guess I just cannot figure out how to get it to work.

Any help would be amazingly awesome. Thanks!
