# 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/62372>\
**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/62372 "2004-08-27T08:16:09Z")\
**Posts on this page:** 3\
**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/62372/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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 27, 2004, 9:26am UTC](https://forum.kirupa.com/t/closing-a-pop-window-in-flash-yes-i-know-i-know/62372/2 "2004-08-27T09:26:43Z")

</div>

This might help - [http://www.kirupaforum.com/forums/showthread.php?t=58506&highlight=close+pop+window](http://www.kirupaforum.com/forums/showthread.php?t=58506&highlight=close+pop+window)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 27, 2004, 9:31am UTC](https://forum.kirupa.com/t/closing-a-pop-window-in-flash-yes-i-know-i-know/62372/3 "2004-08-27T09:31:12Z")

</div>

Thanks Cello, I just got it to work :love: using this tutorial…cheers anyways

[http://www.webwasp.co.uk/tutorials/b22-communication-js/index.php](http://www.webwasp.co.uk/tutorials/b22-communication-js/index.php)

PS-I had already seen that post but it closed the parent window and not the pop up itself…anyways all kewl now
