Close swf window with a button inside of the swf

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…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!