# Closing a pop window in flash - yes I know, I know

**URL:** <https://forum.kirupa.com/t/closing-a-pop-window-in-flash-yes-i-know-i-know/120771>\
**Category:** Uncategorized\
**Created:** [August 27, 2004, 8:16am UTC](https://forum.kirupa.com/t/closing-a-pop-window-in-flash-yes-i-know-i-know/120771 "2004-08-27T08:16:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jain](https://avatars.discourse-cdn.com/v4/letter/j/f19dbf/32.png) [@jain](https://forum.kirupa.com/u/jain)\
**Post date:** [August 27, 2004, 8:16am UTC](https://forum.kirupa.com/t/closing-a-pop-window-in-flash-yes-i-know-i-know/120771/1 "2004-08-27T08:16:09Z")

</div>

Hey there,  
Before anyone freaks out, yes I have searched and read up on this for hours now and I can’t seem to be get it right…

Simple…close a pop up window from flash.

**The code that opens the pop up has this code: (from kirupa)**  
on (release) {  
//customize the window that gets opened  
// 0 equals NO.  
// 1 equals YES.  
address = “[http://www.blagh.com/pop-up.htm](http://www.blagh.com/pop-up.htm)”;  
target\_winName = “music”;  
width = 250;  
height = 90;  
toolbar = 0;  
location = 0;  
directories = 0;  
status = 0;  
menubar = 0;  
scrollbars = 0;  
resizable = 0;  
//sends data back to the function  
openWinCentre(address, target\_winName, width, height, toolbar, location, directories, status, menubar, scrollbars, resizable);  
}

**and the button to close the pop up is this:**

on (release) {  
getURL(“javascript:window.close(’/pop-up.htm’);”);

However, this closes the parent window and leaves the pop up open…

Have tried this in various ways but nothing seems to work??

any help VERY much appreciated…

cheers  
Jain
